Commit fba3eed7 authored by Alain Takoudjou's avatar Alain Takoudjou Committed by Alain Takoudjou

slapformat: update tests with changes on login shell for slapos users

parent 095e3aff
...@@ -636,8 +636,9 @@ class TestUser(SlapformatMixin): ...@@ -636,8 +636,9 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd doesnotexistsyet', 'groupadd doesnotexistsyet',
'useradd -d /doesnotexistsyet -g doesnotexistsyet '\ 'useradd -d /doesnotexistsyet -g -s /bin/sh doesnotexistsyet '\
'doesnotexistsyet -r' 'doesnotexistsyet -r',
'passwd -l doesnotexistsyet'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -649,8 +650,9 @@ class TestUser(SlapformatMixin): ...@@ -649,8 +650,9 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd doesnotexistsyet', 'groupadd doesnotexistsyet',
'useradd -d /doesnotexistsyet -g doesnotexistsyet -G '\ 'useradd -d /doesnotexistsyet -g doesnotexistsyet -s /bin/sh -G '\
'additionalgroup1,additionalgroup2 doesnotexistsyet -r' 'additionalgroup1,additionalgroup2 doesnotexistsyet -r',
'passwd -l doesnotexistsyet'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -662,7 +664,8 @@ class TestUser(SlapformatMixin): ...@@ -662,7 +664,8 @@ class TestUser(SlapformatMixin):
user.create() user.create()
self.assertEqual([ self.assertEqual([
'useradd -d /testuser -g testuser testuser -r' 'useradd -d /testuser -g testuser -s /bin/sh testuser -r',
'passwd -l testuser'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -676,8 +679,9 @@ class TestUser(SlapformatMixin): ...@@ -676,8 +679,9 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd testuser', 'groupadd testuser',
'usermod -d /testuser -g testuser -G '\ 'usermod -d /testuser -g testuser -s /bin/sh -G '\
'additionalgroup1,additionalgroup2 testuser' 'additionalgroup1,additionalgroup2 testuser',
'passwd -l testuser'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -690,7 +694,8 @@ class TestUser(SlapformatMixin): ...@@ -690,7 +694,8 @@ class TestUser(SlapformatMixin):
self.assertEqual([ self.assertEqual([
'groupadd testuser', 'groupadd testuser',
'usermod -d /testuser -g testuser testuser' 'usermod -d /testuser -g testuser -s /bin/sh testuser',
'passwd -l testuser'
], ],
self.fakeCallAndRead.external_command_list) self.fakeCallAndRead.external_command_list)
...@@ -704,7 +709,8 @@ class TestUser(SlapformatMixin): ...@@ -704,7 +709,8 @@ class TestUser(SlapformatMixin):
user.create() user.create()
self.assertEqual([ self.assertEqual([
'usermod -d /testuser -g testuser testuser' 'usermod -d /testuser -g testuser testuser -s /bin/sh testuser',
'passwd -l testuser']
], ],
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