-
Notifications
You must be signed in to change notification settings - Fork 696
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4116 from freedomofpress/updated-release-upgrades
[xenial] Updated release-upgrades Prompt for Trusty, Xenial as appropriate
- Loading branch information
Showing
2 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains 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
27 changes: 27 additions & 0 deletions
27
molecule/testinfra/staging/common/test_release_upgrades.py
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
def test_release_manager_upgrade_channel(host): | ||
""" | ||
Ensures that the `do-release-upgrade` command will honor | ||
upgrades from Trusty to Xenial, but not suggest upgrades | ||
from Xenial to Bionic (which is untested and unsupported.) | ||
""" | ||
expected_channels = { | ||
"trusty": "lts", | ||
"xenial": "never", | ||
} | ||
|
||
config_path = "/etc/update-manager/release-upgrades" | ||
assert host.file(config_path).is_file | ||
|
||
raw_output = host.check_output("grep '^Prompt' {}".format(config_path)) | ||
_, channel = raw_output.split("=") | ||
|
||
expected_channel = expected_channels[host.system_info.codename] | ||
assert channel == expected_channel | ||
|
||
|
||
def test_do_release_upgrade_is_installed(host): | ||
""" | ||
Ensure the `do-release-upgrade` command is present on target systems, | ||
so that instance Admins can upgrade from Trusty to Xenial. | ||
""" | ||
assert host.exists("do-release-upgrade") |