Commit 98482485 authored by Alain Takoudjou's avatar Alain Takoudjou

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

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