testing: simplify test_upgrade.py (SC-185)#932
Merged
Conversation
test_upgrade.py was outputting a ton of stuff that had to be manually collected and verified. This commit adds more assertions to the test and outputs directly to the logs rather than separate files.
15ddf9d to
dc653a7
Compare
blackboxsw
approved these changes
Jul 1, 2021
| # Get the network cfg file | ||
| netcfg_path = '/dev/null' | ||
| if image.os == 'ubuntu': | ||
| netcfg_path = '/etc/netplan/50-cloud-init.yaml' |
Collaborator
There was a problem hiding this comment.
Was this omission from output or comparisons intentional? It seems like this check could be part of # Ensure important things stayed the same
Contributor
Author
There was a problem hiding this comment.
It was intentional. I think the original intent of this check was to show that networking stayed the same, even when upgrading from ENI to netplan. In a post-xenial world, everything is netplan.
I can add the check back though. Checking that networking hasn't changed at all can still be valuable.
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Commit Message
Additional Context
The current "automated" way of running upgrade tests is actually slower than running things manually. All of the info was output to files that had to be manually collected and side-by-side compared. Verifying the upgrade will still require finding the output in the logs and doing a quick compare, but that will be a lot faster than dealing with the external files.
Here's an example of what the log looks like inline with the test output:
Test Steps
pytest tests/integration_tests/test_upgrade.py
Checklist: