-
Notifications
You must be signed in to change notification settings - Fork 510
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
Acceptance test for create, get and delete aggregate #745
Acceptance test for create, get and delete aggregate #745
Conversation
Build succeeded.
|
@jtopjian This is ready for review. |
@dstdfx Thanks for adding the tests for this. This works, but since you're going to implement the full suite of aggregate support, it would be beneficial in the long-term to make the acceptance tests work like the others. In particular, there should be helper functions for both create and delete. An easy example to base this off of is "flavors": https://github.com/gophercloud/gophercloud/blob/master/acceptance/openstack/compute/v2/flavors_test.go#L78-L91 Note how there's a
This way, along with the user-facing support for aggregates, internally Gophercloud also has helper functions which can be used (and re-used) for various acceptance tests. For example, in theory, one could create an acceptance test to create an aggregate and launch a server in that aggregate easily by using the helper functions in Let me know if you have any questions or need help with this. |
3c56f1b
to
2f3dc66
Compare
2f3dc66
to
617ffd5
Compare
Build failed.
|
recheck |
Build failed.
|
recheck |
Build failed.
|
recheck |
Build failed.
|
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.
@dstdfx The OpenLab tests aren't showing a test results page, but the failure is in the raw output:
2018-02-02 20:46:06.256799 | ubuntu-xenial | acceptance/openstack/compute/v2/aggregates_test.go:44:35: undefined: aggregate
2018-02-02 20:46:06.257086 | ubuntu-xenial | FAIL github.com/gophercloud/gophercloud/acceptance/openstack/compute/v2 [build failed]
if err != nil { | ||
t.Fatalf("Unable to create an aggregate: %v", err) | ||
} | ||
defer DeleteAggregate(t, client, aggregate) |
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 should be
defer DeleteAggregate(t, client, createdAggregate)
Build succeeded.
|
LGTM! Thanks, @dstdfx :) |
* vendor: github.com/gophercloud/gophercloud@latest - go get github.com/gophercloud/gophercloud@latest - go mod tidy && go mod vendor - update resources that now use pointer references * vendor: github.com/gophercloud/utils@latest go get github.com/gophercloud/utils@latest go mod tidy && go mod vendor
For #738
Related to PRs: