Use new unit test fixture for pilot control tests#292
Use new unit test fixture for pilot control tests#292jetstack-bot merged 1 commit intojetstack:masterfrom
Conversation
| _, err = client.Update(desiredPilot) | ||
| _, err = client.Create(desiredPilot) | ||
| if k8sErrors.IsAlreadyExists(err) { | ||
| return nil |
There was a problem hiding this comment.
I worry returning nil here just because a pilot with that same name already exists could cause problems. Similar to my comments in #291, I think we should return an error here and let the next invocation of the loop take the correct action (once the lister is consistent)
| t.Log(updatedLabels) | ||
| t.Error("custom labels were altered") | ||
| } | ||
| "no error if pilot not yet listed": { |
There was a problem hiding this comment.
This should be an error IMO (we have retry logic to handle cache inconsistencies)
| if updatedLabels["foo"] != "bar" { | ||
| t.Log(updatedLabels) | ||
| t.Error("custom labels were altered") | ||
| } |
There was a problem hiding this comment.
Is this no longer necessary?
There was a problem hiding this comment.
I've removed the update code so no longer necessary.
* Removes the Pilot Update code. Instead we (for now) only create missing pilots. * Later the pilot creation and deletion will be done by the ScaleOut and ScaleIn actions. * Add some documentation explaining why Pilot resources are created and how they are named.
ad1dc7a to
1571422
Compare
|
/lgtm |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: munnerz The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Release note: