-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
Implement Openstack cloudmock, add integration test #9722
Implement Openstack cloudmock, add integration test #9722
Conversation
Skipping CI for Draft Pull Request. |
/test all |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: rifelpet 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 |
8ecce2d
to
a01647d
Compare
This is the bulk of the changes necessary to support openstack integration tests. As mentioned in cloudmock/openstack/README.md, this involved a lot of wireshark to understand how the gophercloud clients builds the requests and expects the responses.
This will create / update / update / delete an openstack cluster using cloudmock, ensuring there are no lingering changes reported or orphaned resources
a01647d
to
6991655
Compare
/test all |
/test pull-kops-verify-staticcheck |
/cc @olemarkus |
The test and the clusterspec looks good. I didn't go through all the mock implementations in detail though. I suspect tweaks are needed anyway once we try to add a more complex spec. There is no way to go in and verify that e.g dns servers was correctly set on a subnet after the tests has run right? One would need something like Heat or Terraform support to validate that? Which doesn't even guarantee that the direct output works as expected. /lgtm |
Right, this wont verify that values are set properly. Terraform support would take us a step further since it has input validation, but neither would catch issues like "the wrong IP was used" or "there's a typo in userdata". Those could only be caught by having e2e jobs which would definitely be my preferred route but we've discussed that a few times :) hopefully we can get the infra in place for that sometime. In the mean time, this integration test will catch issues like:
|
@xoxbet oops you're right, that was supposed to be #9691. Thanks for catching that |
This implements basic CRUD logic for all of the openstack resources, a followup to #9691
Most of the resource types are pretty straight forward except:
remote_group_id
query param behaves differently than other filters - if it isn't provided that indicates the rules should not have a remote_group_id field, rather than not filtering on the field at all.Next steps:
spec.cloudConfig.openstack
This is a large PR but most of the file changes are all independent so the "context depth" for reviewing this shouldn't be too bad, but if you want me to break up the first commit further I can do that.