Closed kakkoyun closed 4 years ago
@squat Regarding the following comment:
If you want to trigger a change, then I think the correct order of operations would be to do:
- create klient
- bootstrap initial resources
- start controller
- wait for sync
- compare resources
Since we only want to conduct updates on generated configmap when we have changed hashrings, we are making changes on generated and original configmaps after their initial creation. That's why I've put 2 reconciliation loops in those tests, one after creation and one after updates.
What do you think could we simplify this?
OK I see what you are saying now but I think that the multiple re-syncs complicate the logic. The tests should be distilled the most minimal set of operations needed to assert our expectations. The point of this test is to ensure that given an existing generated configmap, the resulting configmap will look how we expect, right? So:
This PR fixes minor issues that has been introduced by previous PR #30.
cc @brancz