summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorJoshua Harlow <harlowja@yahoo-inc.com>2012-09-21 14:38:40 -0700
committerJoshua Harlow <harlowja@yahoo-inc.com>2012-09-21 14:38:40 -0700
commit47d9df78264625207342e668a9120fa84b6ad355 (patch)
tree7aaaeff040dcebdb67616616f189709c78ac08cb /tests
parent712d019cba5afb535033e8228ad365071661ceb2 (diff)
downloadvyos-cloud-init-47d9df78264625207342e668a9120fa84b6ad355.tar.gz
vyos-cloud-init-47d9df78264625207342e668a9120fa84b6ad355.zip
Also allow the user list to come in as a comma
separated list so that its types match more of what the group list can be.
Diffstat (limited to 'tests')
-rw-r--r--tests/unittests/test_distros/test_user_data_normalize.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/unittests/test_distros/test_user_data_normalize.py b/tests/unittests/test_distros/test_user_data_normalize.py
index 6ff43a76..caf479cd 100644
--- a/tests/unittests/test_distros/test_user_data_normalize.py
+++ b/tests/unittests/test_distros/test_user_data_normalize.py
@@ -112,6 +112,17 @@ class TestUGNormalize(MockerTestCase):
((users, def_user), groups) = distro.normalize_users_groups(ug_cfg)
self.assertEquals({}, def_user)
+ def test_users_simple_csv(self):
+ distro = self._make_distro('ubuntu')
+ ug_cfg = {
+ 'users': 'joe,bob',
+ }
+ ((users, def_user), groups) = distro.normalize_users_groups(ug_cfg)
+ self.assertIn('joe', users)
+ self.assertIn('bob', users)
+ self.assertEquals({}, users['joe'])
+ self.assertEquals({}, users['bob'])
+
def test_users_simple(self):
distro = self._make_distro('ubuntu')
ug_cfg = {