Add --system to slapformat useradd tests

parent bb767cc0
...@@ -225,7 +225,7 @@ class TestComputer(SlapformatMixin): ...@@ -225,7 +225,7 @@ class TestComputer(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'ip addr list bridge', 'ip addr list bridge',
'groupadd slapsoft', 'groupadd slapsoft',
'useradd -d /software_root -g slapsoft -s /bin/false slapsoft' 'useradd -d /software_root -g slapsoft -s /bin/false slapsoft --system'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -259,7 +259,7 @@ class TestComputer(SlapformatMixin): ...@@ -259,7 +259,7 @@ class TestComputer(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'ip addr list bridge', 'ip addr list bridge',
'groupadd slapsoft', 'groupadd slapsoft',
'useradd -d /software_root -g slapsoft -s /bin/false slapsoft' 'useradd -d /software_root -g slapsoft -s /bin/false slapsoft --system'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -309,9 +309,9 @@ class TestComputer(SlapformatMixin): ...@@ -309,9 +309,9 @@ class TestComputer(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'ip addr list bridge', 'ip addr list bridge',
'groupadd slapsoft', 'groupadd slapsoft',
'useradd -d /software_root -g slapsoft -s /bin/false slapsoft', 'useradd -d /software_root -g slapsoft -s /bin/false slapsoft --system',
'groupadd testuser', 'groupadd testuser',
'useradd -d /instance_root/partition -g testuser -s /bin/false -G slapsoft testuser', 'useradd -d /instance_root/partition -g testuser -s /bin/false -G slapsoft testuser --system',
'tunctl -t tap -u testuser', 'tunctl -t tap -u testuser',
'ip link set tap up', 'ip link set tap up',
'brctl show', 'brctl show',
...@@ -391,9 +391,9 @@ class TestComputer(SlapformatMixin): ...@@ -391,9 +391,9 @@ class TestComputer(SlapformatMixin):
self.assertEqual([ self.assertEqual([
# 'ip addr list bridge', # 'ip addr list bridge',
'groupadd slapsoft', 'groupadd slapsoft',
'useradd -d /software_root -g slapsoft -s /bin/false slapsoft', 'useradd -d /software_root -g slapsoft -s /bin/false slapsoft --system',
'groupadd testuser', 'groupadd testuser',
'useradd -d /instance_root/partition -g testuser -s /bin/false -G slapsoft testuser', 'useradd -d /instance_root/partition -g testuser -s /bin/false -G slapsoft testuser --system',
# 'ip addr add ip/255.255.255.255 dev bridge', # 'ip addr add ip/255.255.255.255 dev bridge',
# 'ip addr list bridge', # 'ip addr list bridge',
# 'ip addr add ip/ffff:ffff:ffff:ffff:: dev bridge', # 'ip addr add ip/ffff:ffff:ffff:ffff:: dev bridge',
...@@ -469,7 +469,7 @@ class TestUser(SlapformatMixin): ...@@ -469,7 +469,7 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd doesnotexistsyet', 'groupadd doesnotexistsyet',
'useradd -d /doesnotexistsyet -g doesnotexistsyet -s /bin/false '\ 'useradd -d /doesnotexistsyet -g doesnotexistsyet -s /bin/false '\
'doesnotexistsyet' 'doesnotexistsyet --system'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -482,7 +482,7 @@ class TestUser(SlapformatMixin): ...@@ -482,7 +482,7 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd doesnotexistsyet', 'groupadd doesnotexistsyet',
'useradd -d /doesnotexistsyet -g doesnotexistsyet -s /bin/false -G '\ 'useradd -d /doesnotexistsyet -g doesnotexistsyet -s /bin/false -G '\
'additionalgroup1,additionalgroup2 doesnotexistsyet' 'additionalgroup1,additionalgroup2 doesnotexistsyet --system'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -494,7 +494,7 @@ class TestUser(SlapformatMixin): ...@@ -494,7 +494,7 @@ class TestUser(SlapformatMixin):
user.create() user.create()
self.assertEqual([ self.assertEqual([
'useradd -d /testuser -g testuser -s /bin/false testuser' 'useradd -d /testuser -g testuser -s /bin/false testuser --system'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment