-
Notifications
You must be signed in to change notification settings - Fork 40
UPSTREAM: <carry>: openshift: clean up test setup #80
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
UPSTREAM: <carry>: openshift: clean up test setup #80
Conversation
As this is still WIP /hold |
076be26
to
6b835aa
Compare
346f006
to
5d368ca
Compare
/hold cancel |
/refresh |
/retest |
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_provider.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_nodegroup_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_nodegroup_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_nodegroup_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Outdated
Show resolved
Hide resolved
cluster-autoscaler/cloudprovider/openshiftmachineapi/machineapi_controller_test.go
Outdated
Show resolved
Hide resolved
3bdd54a
to
ea8237b
Compare
@ingvagabund I believe I addressed your issues and observations - and thanks! |
/hold Holding pending final review and LGTM. At that point I want to squash a lot of these commits. |
LGTM, once squashed as you say I will add real lgtm |
/test images |
/test e2e-aws-operator |
Expose the internal type nodegroup at the controller level. This makes unit testing more feasible. The upper layers (i.e., the provider) convert to cloudprovider.<types>.
Use "machine.openshift.io/machine" as constant value throughout, not just in the tests.
Extract the nodegroup.Debug() format string as a const to share between said function and unit tests.
Shorten the test helper function names that create spec and configs for the unit tests. They previously had `must` as part of the name but they don't actually fail and/or return any error.
c866ecc
to
1a6228b
Compare
/refresh |
/test images |
/test e2e-aws-operator |
/retest |
@ingvagabund this has now been rebased as #76 has merged. |
/hold cancel |
/lgtm |
This a rework of how the unit tests setup the controller and the objects under test. We previously accumulated three ways of setting up the tests - this change reduces that to using just one way, providing uniformity and consistency for all the tests.
The controller functions now return the
nodegroup
type rather thancloudprovider.<type>
to make unit testing easier. The upper layers (i.e., the provider) convert thenodegroup
tocloudprovider.NodeGroup
. Anodegroup
is acloudprovider.NodeGroup
so the overall change here is really small - it only changes the function signature.Plus various drive-by fixes in the unit tests themselves to: