diff options
author | Joshua Powers <josh.powers@canonical.com> | 2017-03-14 15:28:08 -0600 |
---|---|---|
committer | Scott Moser <smoser@brickies.net> | 2017-03-17 15:47:54 -0400 |
commit | 41950e902f5dd6cb3118280d3d27409812702e41 (patch) | |
tree | 892d617dab12876dd4b3e12e67cb1b43080e3bb4 /tests/cloud_tests/testcases/modules | |
parent | a33447344eed897010603b3e8ea1fd122052de76 (diff) | |
download | vyos-cloud-init-41950e902f5dd6cb3118280d3d27409812702e41.tar.gz vyos-cloud-init-41950e902f5dd6cb3118280d3d27409812702e41.zip |
test: Adding integratiron test for password as list
This adds an integration test for setting passwords when given
as a list rather than a string. This also updates the docs and
tests so that Random is now RANDOM as is correct.
Diffstat (limited to 'tests/cloud_tests/testcases/modules')
-rw-r--r-- | tests/cloud_tests/testcases/modules/set_password_list.py | 20 | ||||
-rw-r--r-- | tests/cloud_tests/testcases/modules/set_password_list_string.py | 11 |
2 files changed, 14 insertions, 17 deletions
diff --git a/tests/cloud_tests/testcases/modules/set_password_list.py b/tests/cloud_tests/testcases/modules/set_password_list.py index b764362f..6819d259 100644 --- a/tests/cloud_tests/testcases/modules/set_password_list.py +++ b/tests/cloud_tests/testcases/modules/set_password_list.py @@ -4,22 +4,8 @@ from tests.cloud_tests.testcases import base -class TestPasswordList(base.CloudTestCase): - """Test password module""" - - # TODO: Verify dick and harry passwords are random - # TODO: Verify tom's password was changed - - def test_shadow(self): - """Test every tom, dick, and harry user in shadow""" - out = self.get_data_file('shadow') - self.assertIn('tom:', out) - self.assertIn('dick:', out) - self.assertIn('harry:', out) - - def test_sshd_config(self): - """Test sshd config allows passwords""" - out = self.get_data_file('sshd_config') - self.assertIn('PasswordAuthentication yes', out) +class TestPasswordList(base.PasswordListTest, base.CloudTestCase): + """Test password setting via list in chpasswd/list""" + __test__ = True # vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/modules/set_password_list_string.py b/tests/cloud_tests/testcases/modules/set_password_list_string.py new file mode 100644 index 00000000..2c34fada --- /dev/null +++ b/tests/cloud_tests/testcases/modules/set_password_list_string.py @@ -0,0 +1,11 @@ +# This file is part of cloud-init. See LICENSE file for license information. + +"""cloud-init Integration Test Verify Script""" +from tests.cloud_tests.testcases import base + + +class TestPasswordListString(base.PasswordListTest, base.CloudTestCase): + """Test password setting via string in chpasswd/list""" + __test__ = True + +# vi: ts=4 expandtab |