testing: integration_test updates (SC-362)#1001
Merged
TheRealFalcon merged 21 commits intocanonical:mainfrom Sep 15, 2021
Merged
testing: integration_test updates (SC-362)#1001TheRealFalcon merged 21 commits intocanonical:mainfrom
TheRealFalcon merged 21 commits intocanonical:mainfrom
Conversation
3abc512 to
96486e4
Compare
Collaborator
|
@TheRealFalcon you'll also need this to fix the Azure FIps test diff --git a/tests/integration_tests/bugs/test_lp1835584.py b/tests/integration_tests/bugs/test_lp1835584.py
index 660d2a2a1..e5fe3fd59 100644
--- a/tests/integration_tests/bugs/test_lp1835584.py
+++ b/tests/integration_tests/bugs/test_lp1835584.py
@@ -59,6 +59,10 @@ def _check_iid_insensitive_across_kernel_upgrade(
result = instance.execute("apt-get install linux-azure --assume-yes")
if not result.ok:
pytest.fail("Unable to install linux-azure kernel: {}".format(result))
+ # Remove ubuntu-azure-fips metapkg which mandates FIPS-flavour kernel
+ result = instance.execute("ua disable fips --assume-yes")
+ if not result.ok:
+ pytest.fail("Unable to disable fips: {}".format(result))
instance.restart()
new_kernel = instance.execute("uname -r").strip()
assert orig_kernel != new_kernel
|
Contributor
Author
|
Wahoo...Thanks! |
3 tasks
5bb4fb5 to
8496115
Compare
version of LXD. Additionally, I split the jinja templated tests into a separate module as bionic vms were unable to read the sensitive instance json. In general the jinja functionality feels a bit more fragile.
Currently we get warnings on every launch for a particular cloud. Moving all traceback/warning checks to a dedicated function makes it easy for us to workaround such persistent warnings.
Sometimes the datasource listed in /run/cloud-init/result.json can show /var/lib/waagnet or a mounted device. Since both of these are valid, simply check for 'DataSourceAzure' in the test_upgrade check.
Since cloud's will often specify their own ntp servers in the ntp configuration files, specify the servers manually so we have no unexpected results
the test_ssh_keysfile.py was written again NoCloud. In real clouds, keys added to your account are also added to the authorized_keys file. Test needed to be updated to account for this.
test_user_events.py and test_version_change.py both have tests that assume we will have valid ds cache when rebooting. In test_user_events.py, subsequent boots should block applying network on boot if boot event is denied. However, if the cache is invalid, it is valid to apply networking config on that boot. In test_version_change.py, no cache found won't trigger the expected debug log. Additionally, the pickle used for that test on an older release triggered an expected issue that took a different error path.
On Bionic, we traceback when attempting to detect the hotplugged device in the updated metadata. This is because Bionic is specifically configured not to provide network metadata. This is a legitimate issue, but can be addressed outside of these test changes and in the next release.
In test_final_message, we ensure that the variable substition works as expected. For $timestamp, we compare against the current date. It's possible for the host date to be massively different from the client date, so obtain date on client rather than host.
Module may fail unrelatedly (in this case apt-get update is failing), but the test should still pass
As part of test setup, we can install cloud-init from various sources, including PROPOSED, PPAs, etc. We were never checking that this install completes successfully, and on one particular cloud, it wasn't because apt locking issues. Code has been updated to retry, and then fail loudly if we can't complete the install.
Azure has a separate service to clear the pickled metadata every boot, so test was updated to account for that behavior.
If there's already a pre-existing cause for warning or tracebacks, that shouldn't cause this SRU to fail
8bbf744 to
81a9216
Compare
blackboxsw
approved these changes
Sep 15, 2021
Collaborator
blackboxsw
left a comment
There was a problem hiding this comment.
Thank you for all of these changes.
| # log | ||
| pytest.skip("NotImplementedError when requesting console log") | ||
| return | ||
| if console_log.lower() == 'no console output': |
Collaborator
There was a problem hiding this comment.
Thanks for this addition/retry fix here.
This was referenced May 12, 2023
Closed
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
Test Steps
Run integration tests
Checklist: