-
Notifications
You must be signed in to change notification settings - Fork 72
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
Initial integration testing environment #8
Conversation
- based on behave, ansible and pipenv - currently just a skeleton to show the proposed structure for writing test scenarios using local VMs - TODO messages will be replaced with actual Ansible and Leapp commands to create, configure & update local VMs
The core idea here is that even though this is only a prototype, we still want to be able to clearly define:
That kind of scenario based testing is where BDD frameworks like |
@shaded-enmity ^^^ |
- rely on Vagrant for local VM management - run migration and get IP addresses through Leapp - code to retrieve IP addresses is currently failing
Updated the PR description to reflect today's updates - these are real tests now, although I had to modify the current SSH kludge in leapp-tool to get the migration step to work. |
The tests are currently failing, and I suspect the problem is that
|
This also shows that getting to a point where we can keep the target VM around between runs should give a decent performance boost - not only will it save setup time on the VM itself, but we'll be able to retain a Docker image cache inside the VM. |
- complain if the migration fails - expose port 80 rather than port 9000 - note that SELinux is being turned off, not enabled
Current status:
So I'm guessing I broke something when attempting to simplify the test scenario back to just the default httpd test page... |
- waits up to 90 seconds for response from target server - fixes some other issues in the response checking TODO: normalise the server IP details in responses
From further testing today it looks like the problems on Friday were just a race condition between Apache coming up in the macrocontainer and the test harness checking for a response - looping for up to 90 seconds waiting for a response from the target resolved that. There are at least two remaining issues to resolve:
|
Wow, that's plenty of nice changes, my finger is itching on the merge button :) One thing I've been thinking about is how to run the test suite in e.g. Travis-CI, which led me to: http://stackoverflow.com/questions/37307114/launching-a-vagrant-vm-inside-travis-ci So if we "reduce" our source VM to 32bit we might be able to run on Travis (which leads me to another interesting question whether or not the 32bit kernel actually supports Docker). |
I think that the 500's thrown by Apache are due to default misconfiguration, I'll take a look at that. |
Hmm, for some reason I'm getting digest mismatch on the
Investigating 🔍 🕵️ 🔎 |
Okay, so this might be something worth reporting to
Ie. also include the version of the interpreter in the |
|
||
$ pipenv shell | ||
|
||
Once in the testing environment, the tests can be run by invoking |
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.
Had to cd integration-tests/
before calling behave
.
Hmm, for some reason running |
Ok, after some wrestling I was able to run the tests:
After the initial test run I'll look into why I'm needed to run these two commands in the first place, must be something subtle specific to my box. |
The 500's are thrown by Apache due to old config, all that is needed is to remove the line:
From |
I filed https://github.com/kennethreitz/pipenv/issues/295 to cover improving the hash mismatch error messages. When setting up with |
Conveniently, fixing the Apache configuration error also removed the server IP address from the HTTP response, which meant the only subsequent adjustment needed to the tests was to start checking for the specific expected HTTP status code, rather than just that the migrated server returned the same status code as the original. Also, TIL that the Apache test page returns 403 rather than 200 :) |
Since this is passing the tests now, I went ahead and merged it so I could start working on removing the Vagrant SSH hacks: #9 As far as 32-bit arches go, you're not going find any official 32-bit CentOS vagrant boxes, so we'd have to create and maintain those ourselves. At that point, it would probably be simpler to ask the CentOS folks if we can set something 64-bit friendly up in the CentOS CI infrastructure rather than trying to get things working in Travis. |
and query local IP addreses
Known issues: