-
Notifications
You must be signed in to change notification settings - Fork 517
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
Compute Acceptance Test Fixes #8
Conversation
@jrperritt No doubt I'm jumping the gun on getting fixes/changes into this new repo, so please feel free to nit (or nix) all of this. I began going through the compute acceptance tests and thought about compiling them all into one large PR, but it looks like that would be one very large PR. In addition, some of the test failures might require changes to the corresponding packages (see #7). So I thought I'd start with this which at least allows individual tests to be run. |
437a5fd
to
d493d0b
Compare
@jrperritt Curiosity is getting the best of me and I've started going through each of the Compute acceptance tests to see what fixes they need or how I can practice cleaning them up. I have each of the above tests also in separate branches if that would be easier, but some require a few common fixes. I can look at making each branch completely standalone, though. |
defer func() { | ||
servers.Delete(client, server.ID) | ||
t.Logf("Server deleted.") | ||
}() |
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.
I've moved the delete defer to be triggered after the instance has been confirmed ACTIVE. This is so if instance creation fails, the error'd instance still remains so the tester can investigate why the instance failed to launch. When defer was in its original location, the instance would immediately be deleted, the UUID never printed (though this can be fixed), and troubleshooting was much harder.
d5b244a
to
49f9007
Compare
As far as I'm concerned, you can't make the acceptance tests any worse than they were before this PR. Because of that, As long as you're only touching the acceptance tests (or docs), I'm not concerned about reviewing this (and therefore not concerned about the size of it). Once you're happy with it (and it builds), let me know and I'll merge it. |
I'm gonna take that as a compliment :D Sounds good. This has been pretty fun and a good way for me to determine what needs to be (or can be, for the better) changed in Terraform. |
It was, and a slight to myself. |
8df0cb1
to
260f698
Compare
@jrperritt I think this is ready to go! There are probably a few nits here and there and I wasn't able to successfully run the Let me know if you have any questions. |
@@ -0,0 +1,153 @@ | |||
#!/bin/bash |
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.
Did you mean for this to be committed, and, if so, can you comment on what it does? Something like # Installs keylogger
would suffice.
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.
Yup, meant to commit it, but oops on not having any useful comments.
Can you merge or rebase with |
The following changes were made to the common compute acc test functions: * Check for Instances in ERROR state to immediately return. * Making OS_POOL_NAME required. * Added identity client function. * Added block storage client function. * Making "private" the default OS_NETWORK_NAME.
The following changes were made to the flavor acceptance test: * Renamed tests so tests can selectively be run by substring * Reading all returned pages at once. * Modified test output. * Printing all flavor attributes.
The following changes were made to the image acceptance test: * Added test to get a single image. * Renamed tests so tests can selectively be run by substring * Reading all returned pages at once. * Modified test output. * Printing all image attributes.
The following changes were made to the servers acceptance tests: * Renamed tests so tests can selectively be run by substring. * Reading all returned pages at once. * Modified test output. * Printing all server attributes in output. * Consistently place and log server deletion. * Fixed occurrences of wrong error variable being reported. * Removed invalid resize error. * Implemented RebootOpts in order to test server reboot.
The following changes were made to the servergroups acceptance tests: * Renamed servers to servergroups in build tag * Renamed tests so tests can selectively be run by substring. * Modified test output. * Printing all servergroups attributes.
The following changes were made to the keypairs acceptance tests: * Added build tags. * Added List test. * Added Create test. * Added Import test. * Cleaned up Server Create test. * Printing all keypairs attributes.
The following changes were made to the security groups acceptance tests: * Created List test. * Broke out Create, Update, and Rule tests. * Printing all security group attributes. * Renamed AddServerToGroup to AddServer. * Renamed RemoveServerFromGroup to RemoveServer.
The following changes were made to the floating IPs acceptance test: * Renamed package floatingip to floatingips. * Created List test. * Broke out Create, Associate, and Associate Fixed IP tests. * Removed deprecated associate tests. * Printing all floating IP attributes.
The following changes were made to the tenant networks acceptance tests: * Created List test. * Created Get test. * Removed server test. * Printing all tenant network attributes.
The following changes were made to the networks acceptance tests: * Created List test. * Created Get test. * Removed server test. * Printing all network attributes.
The following changes were made to the extensions acceptance tests: * Retrieving all extensions with all pages. * Fixed build tag. * Renamed tests so tests can selectively be run by substring. * Printing all extension attributes.
The following changes were made to the quota sets acceptance tests: * Added build tag. * Renamed tests so tests can selectively be run by substring. * Now obtaining identityclient via common compute acctest function.
The following changes were made to the defsecrules acceptance tests: * Renamed tests so tests can selectively be run by substring. * Retrieving lists with all pages. * Renamed test file. * Printing all default rule attributes.
The following changes were made to the bootfromvolume acceptance tests: * Renamed tests so tests can selectively be run by substring. * Created createBootFromVolumeServer function
The following changes were amde to the volumeattach acceptance tests: * Added build tag. * Obtaining block storage client from common function. * Printing all volume attachment attributes.
* Removed Rackspace-specific environment variables. * Added OS_POOL_NAME environment variable. * Added OS_NETWORK_NAME environment variable. * Added bash function for test shortcuts. * Added notes about compute tests.
This script will install devstack and Go within a virtual machine. Devstack is configured with the current API versions of all OpenStack services except for Keystone (v2) and LBaaS (v1).
260f698
to
e361ee8
Compare
@jrperritt Done and done. |
Thank you for all the work on this. +2 |
No problem at all. I'll probably go through a few of the others that I'm familiar with (block storage, networking). |
This PR enables individual compute acceptance tests to be run. Only a few acceptance tests are passing at this time, however, these changes are required for Go to validate the
acceptance/openstack/compute/v2
package.For #6