diff options
author | James Falcon <TheRealFalcon@users.noreply.github.com> | 2020-11-23 15:52:19 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-23 16:52:19 -0500 |
commit | 6e86d2a5649b3a9113923c73154ebf02224732a6 (patch) | |
tree | 689c1ae070b08795288e792c2f4af3c73d8fdc4d /tests/integration_tests/modules/test_users_groups.py | |
parent | 8a493bf08d8b09d4f3a35dae725756d157844201 (diff) | |
download | vyos-cloud-init-6e86d2a5649b3a9113923c73154ebf02224732a6.tar.gz vyos-cloud-init-6e86d2a5649b3a9113923c73154ebf02224732a6.zip |
Ensure proper root permissions in integration tests (#664)
Tests previously assumed that when executing commands and transferring
files that user will have root permissions. This change updated
integration testing infrastructure so that is true.
Diffstat (limited to 'tests/integration_tests/modules/test_users_groups.py')
-rw-r--r-- | tests/integration_tests/modules/test_users_groups.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/integration_tests/modules/test_users_groups.py b/tests/integration_tests/modules/test_users_groups.py index 6a085a8f..6a51f5a6 100644 --- a/tests/integration_tests/modules/test_users_groups.py +++ b/tests/integration_tests/modules/test_users_groups.py @@ -70,7 +70,10 @@ class TestUsersGroups: def test_users_groups(self, regex, getent_args, class_client): """Use getent to interrogate the various expected outcomes""" result = class_client.execute(["getent"] + getent_args) - assert re.search(regex, result.stdout) is not None + assert re.search(regex, result.stdout) is not None, ( + "'getent {}' resulted in '{}', " + "but expected to match regex {}".format( + ' '.join(getent_args), result.stdout, regex)) def test_user_root_in_secret(self, class_client): """Test root user is in 'secret' group.""" |