-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
🏃 Refactor of the e2e framework #2294
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: chuckha The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/cc @yastij |
dda38ae
to
8b7e125
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1 for me. I like the consistency of the proposed approach
cc @Arvinderpal |
@detiber @fabriziopandini anything left to address before lgtm? |
lgtm from my side |
test/framework/control_plane.go
Outdated
if err := workloadClient.List(ctx, &nodeList); err != nil { | ||
return nil, err | ||
} | ||
return nodeList.Items, nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to be returning the full node list and not filtering just the nodes related to the MachineDeployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it be better to query the related Machines and wait for them to all have noderefs instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Your suggestion would definitely be an improvement. It would be more true to cluster-api's vision of the cluster.
However this is what the test was doing previous. I'll open an issue to update to improve this function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Agree with deferring the improvement to checking Machines, however Control Plane machines will also have associated Nodes on the remote cluster, and this currently is trying to compare the number of nodes retrieved against the number of desired replicas for the MachineDeployment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok, this requires a change then. The assumption that this PR fixes unfortunately exposed this bug. Good code reading!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:) maybe i meant fortunately.
ad98115
to
163a114
Compare
Signed-off-by: Chuck Ha <[email protected]>
163a114
to
515541f
Compare
/lgtm |
Signed-off-by: Chuck Ha [email protected]
What this PR does / why we need it:
This PR pulls apart the main test into Creation functions, Assertion functions and Deleting functions. This allows far more flexibility in various ways:
deprecated.go
file.I would be happy to simply remove the deprecated.go but didn't want to force anyone into the new style until they have time to update their code.
The biggest downside with this PR is increased length of a test for clients, but the upside is that the test is much more flexible and very explicit.
Which issue(s) this PR fixes (optional, in
fixes #<issue number>(, fixes #<issue_number>, ...)
format, will close the issue(s) when PR gets merged):Fixes #2251
Fixes #2291
/assign @wfernandes @detiber
/cc @akutz @CecileRobertMichon