Jump to: navigation, search

V4/User Life-Cycle Management/Test Plan

Name: V4/User Life-Cycle Management/Test Plan
Target version: 4.2.0
Design: [[1]]
Reviewer: Incomplete.png missing
Last updated: 2015-11-26 by Lryznaro

Contents

Test Plan

Common setup

Running IPA installation is needed.

Test case: Try to search for a nonexistent user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestNonexistentStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-find tuser

Expected results

Should fail:

 $ tuser: user not found

Test case: Try to retrieve a nonexistent user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestNonexistentStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-show tuser

Expected results

Should fail:

 $ tuser: user not found

Test case: Try to update a nonexistent user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestNonexistentStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-mod tuser --last Changed

Expected results

Should fail:

 $ tuser: user not found

Test case: Try to delete a nonexistent user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestNonexistentStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-del tuser

Expected results

Should fail:

 $ tuser: user not found

Test case: Try to activate a nonexistent user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestNonexistentStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-activate tuser

Expected results

Should fail:

 $ tuser: user not found

Test case: Try adding an entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User

Expected results

Should succeed.

-------------------------
Added stage user "tuser"
-------------------------
  User login: tuser
  First name: Test
  Last name: User
  Full name: Test User
  Display name: Test User
  Initials: TU
  Home directory: /home/tuser
  GECOS: Test User
  Login shell: /bin/sh
  Kerberos principal: tuser@IDM.LAB.BOS.REDHAT.COM
  Email address: tuser@idm.lab.bos.redhat.com
  UID: -1
  GID: -1
  Class: testusers
  Password: False
  Kerberos keys available: False

Test case: Try creating a staged user with username that is too long

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser1234567890123456789012345678901234567890 --first Test --last User

Expected results

invalid 'login': can be at most 32 characters

Test case: Try creating a staged user with invalid username

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

None

Actions

 $ ipa stageuser-add +tuser1 --first Test --last User

Expected results

may only include letters, numbers, _, -, . and $

Test case: Try adding a duplicate entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-add tuser --first Test --last User

Expected results

Should fail:

 user with name "tuser" already exists 

Test case: Try searching for an existing entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-find tuser

Expected results

Staged user is found.

Test case: Try searching for an existing entry with --all

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-find tuser --all

Expected results

Should succeed:

--------------
1 user matched
--------------
  dn: uid=tuser,cn=staged users,cn=accounts,cn=provisioning,$SUFFIX
  User login: tuser
  First name: Test
  Last name: User
  Full name: Test User
  Display name: Test User
  Initials: TU
  Home directory: /home/tuser
  GECOS: Test User
  Login shell: /bin/sh
  Kerberos principal: tuser@IDM.LAB.BOS.REDHAT.COM
  Email address: tuser@idm.lab.bos.redhat.com
  UID: -1
  GID: -1
  Password: False
  Kerberos keys available: False
  description: __no_upg__
  ipauniqueid: autogenerate
  nsaccountlock: False
  objectclass: top, person, organizationalperson, inetorgperson, inetuser, posixaccount, krbprincipalaux, krbticketpolicyaux, ipaobject, ipasshuser, ipaSshGroupOfPubKeys, ipauser
----------------------------
Number of entries returned 1
----------------------------

Test case: Try retrieving an existing entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-show tuser

Expected results

Should succeed:

 User login: tuser
 First name: Test
 Last name: User
 Home directory: /home/tuser
 Login shell: /bin/sh
 Email address: tuser@idm.lab.bos.redhat.com
 UID: -1
 GID: -1
 Class: testusers
 Password: False
 Kerberos keys available: False

Test case: Try retrieving an existing entry with --all

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-show tuser

Expected results

Should succeed:

 dn: uid=tuser,cn=staged users,cn=accounts,cn=provisioning,dc=abc,dc=idm,dc=lab,dc=eng,dc=brq,dc=redhat,dc=com
 User login: tuser
 First name: test
 Last name: user
 Full name: test user
 Display name: test user
 Initials: tu
 Home directory: /home/tuser
 GECOS: test user
 Login shell: /bin/sh
 Kerberos principal: tuser@ABC.IDM.LAB.ENG.BRQ.REDHAT.COM
 Email address: tuser@abc.idm.lab.eng.brq.redhat.com
 UID: -1
 GID: -1
 Password: False
 Kerberos keys available: False
 description: __no_upg__
 ipauniqueid: autogenerate
 nsaccountlock: True
 objectclass: ipaSshGroupOfPubKeys, ipaobject, person, top, ipasshuser, inetorgperson, organizationalperson, krbticketpolicyaux, krbprincipalaux, inetuser, posixaccount

Test case: Try modifying an existing entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-mod tuser --first Changed

Expected results

Staged user is modified.

Test case: Try deleting an existing entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-del tuser

Expected results

Staged user is permanently deleted,
 $ ipa stageuser-show tuser
returns no match.

Test case: Try activating an existing entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser already exists.

Actions

 $ ipa stageuser-activate tuser

Expected results

Staged user should be activated.
 $ ipa stageuser-show tuser
returns no match,
 $ ipa user-show tuser
returns one match.

Verify that the activated user is member of ipausers group.

Test case: Try creating a staged user with UID number and GID number, verify the values are preserved after activation

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged or active user tuser does not exist.

Actions

  1.  $ ipa stageuser-add tuser --first test --last user --uid 100 --gidnumber 111
  2.  $ ipa stageuser-activate tuser

Expected results

User should be added. Verify that active user tuser has UID number 100 and GID number 111.

Test case: Try creating an active entry with a username of already created staged user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Staged user tuser already exists.

Actions

 $ ipa user-add tuser --first Test --last User

Expected results

Active user should be added. Staged user cannot be activated.

Test case: Try creating a staged entry with a username of already created active user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Active user tuser already exists.

Actions

 $ ipa stageuser-add tuser --first Test --last User

Expected results

Staged user is added, but cannot be activated.

Test case: Try activating staged entry with existing active user username

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Active user tuser already exists. Staged user tuser exists.

Actions

 $ ipa stageuser-activate tuser

Expected results

Should fail.

Test case: Try creating a staged entry with a username of already existing preserved user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Preserved user tuser already exists.

Actions

 $ ipa stageuser-add tuser --first Test --last User

Expected results

User should be added.

Test case: Try activating staged entry with same username as a preserved user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Preserved user tuser exists. Staged user tuser exists.

Actions

 $ ipa stageuser-activate tuser

Expected results

Should fail.

Test case: Try creating an active entry with a username of already existing preserved user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestDuplicates

Setup

Preserved user tuser already exists.

Actions

 $ ipa user-add tuser --first Test --last User

Expected results

User should not be added.

Test case: Try creating an entry with invalid UID and/or GID number - negative value

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

Staged or active user tuser does not exist.

Actions

  1.  $ ipa stageuser-add tuser --first test --last user --uid -100 --gidnumber -111

Expected results

Should fail.

Test case: Try creating an entry with invalid UID and/or GID number - string value

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

Staged or active user tuser does not exist.

Actions

  1.  $ ipa stageuser-add tuser --first test --last user --uid hundo --gidnumber hhundo

Expected results

Should fail.

Test case: Try creating a staged entry with a full name

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --cn Test User

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with a display name

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --displayname Test User

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with different homedirectory

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --homedir /home/test/tuser

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with different initials

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --initials TeU

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with different gecos

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --gecos Test User, Teston

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with different shell

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --shell ksh

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with different kerberos principal

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --principal useruser

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with uppercase kerberos principal

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --principal TUSER

Expected results

-------------------------
Added stage user "tuser"
-------------------------
  User login: tuser
  First name: Test
  Last name: User
  Full name: Test User
  Display name: Test User
  Initials: TU
  Home directory: /home/tuser
  GECOS: Test User
  Login shell: /bin/sh
  Kerberos principal: tuser@IDM.LAB.BOS.REDHAT.COM
  Email address: tuser@idm.lab.bos.redhat.com
  UID: -1
  GID: -1
  Password: False
  Kerberos keys available: False

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with bad realm in principal

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --principal='tuser@NOTFOUND.ORG' --first=Test --last=User

Expected results

The realm for the principal does not match the realm for this IPA server

Test case: Try creating a staged entry with malformed principal

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestCreateInvalidAttributes

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --principal='tuser@BAD@NOTFOUND.ORG' --first=Test --last=User

Expected results

Principal is not of the form user@REALM: 'tuser@BAD@NOTFOUND.ORG'

Test case: Try creating a staged entry with email

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --email useruser@test.com

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with password

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --password Secret123

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with random password

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --random

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with user ID number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --uid 100

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with group ID number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --gid 100

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with street address

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --street Vodickova

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with city

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --city Brno

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with state

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --state Moravia

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with zip code

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --postalcode 61200

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with telephone number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --phone 555555555

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with mobile telephone number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --mobile 777777777

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with pager number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --pager 111111111

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with fax number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --fax 222222222

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with organizational unit

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --orgunit devel

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with job title

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --title uber manager

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with manager

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist. Active user muser exists.

Actions

 $ ipa stageuser-add tuser --first Test --last User --manager muser

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with car licence

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --carlicence CZ123123123

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try creating a staged entry with SSH public key

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser does not exist.

Actions

 $ ipa stageuser-add tuser --first Test --last User --sshpubkey 'ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDGAX3xAeLeaJggwTqMjxNwa6XHBUAikXPGMzEpVrlLDCZtv00djsFTBi38PkgxBJVkgRWMrcBsr/35lq7P6w8KGIwA8GI48Z0qBS2NBMJ2u9WQ2hjLN6GdMlo77O0uJY3251p12pCVIS/bHRSq8kHO2No8g7KA9fGGcagPfQH+ee3t7HUkpbQkFTmbPPN++r3V8oVUk5LxbryB3UIIVzNmcSIn3JrXynlvui4MixvrtX6zx+O/bBo68o8/eZD26QrahVbA09fivrn/4h3TM019Eu/c2jOdckfU3cHUV/3Tno5d6JicibyaoDDK7S/yjdn5jhaz8MSEayQvFkZkiF0L public key test'

Expected results

Staged user should be added. Verify by running
 $ ipa stageuser-show tuser
.

Verify that the entry can be activated and specified values are preserved.

Test case: Try modifying staged entry with an invalid UID and/or GID number - negative value

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestUpdateInvalidAttributes

Setup

Staged user tuser exists.

Actions

  1.  $ ipa stageuser-mod tuser --uid -100 --gidnumber -111

Expected results

Should fail.

Test case: Try modifying staged entry with an invalid UID and/or GID number - string value

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestUpdateInvalidAttributes

Setup

Staged user tuser exists.

Actions

  1.  $ ipa stageuser-mod tuser --uid hundo --gidnumber hhundo

Expected results

Should fail.

Test case: Try modifying staged entry with valid UID and/or GID number

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestStagedUser

Setup

Staged user tuser exists.

Actions

  1.  $ ipa stageuser-mod tuser --uid 100 --gidnumber 111

Expected results

Should be succesfull, the new values should be saved with the staged user tuser.

Test case: Try to delete active entry

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestActive

Setup

Active user tuser exists.

Actions

 $ ipa user-del tuser

Expected results

--------------------
Deleted user "tuser"
--------------------

The deleted user no longer exists in any container.

Test case: Try to delete active entry with --permanent

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestActive

Setup

Active user tuser exists.

Actions

 $ ipa user-del tuser --permanent

Expected results

--------------------
Deleted user "tuser"
--------------------

The deleted user no longer exists in any container.

Test case: Try to delete active entry with --preserve

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestActive

Setup

Active user tuser exists.

Actions

 $ ipa user-del tuser --preserve

Expected results

The user is removed from active container and is located in deleted container. Verify that the preserved user container is locked and that original ipaUniqueID, uidNumber and gidNumber are preserved.

Test case: Try to delete active entry with both --preserve and --permanent

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestActive

Setup

Active user tuser exists.

Actions

 $ ipa user-del tuser --preserve --permanent

Expected results

Should fail - invalid options.

Test case: Try to search for preserved user using only user-find

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

Preserved user tuser exists.

Actions

 $ ipa user-find tuser

Expected results

No user is found.

Test case: Try to search for preserved user using --preserved

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser in deleted container exists.

Actions

 $ ipa user-find tuser --preserved True

Expected results

User tuser in deleted container is found.

Test case: Try to search for preserved user using --preserved and --all

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

Preserved user tuser exists.

Actions

 $ ipa user-find tuser --preserved True --all

Expected results

User tuser in deleted container is found.

Test case: Try to retrieve preserved user using user-show

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser exists in deleted container.

Actions

 $ ipa user-show tuser

Expected results

No users are found.

Test case: Try unlocking preserved user entry using user-enable

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser exists in deleted container.

Actions

 $ ipa user-enable tuser

Expected results

Should fail.

Test case: Try to reactivate preserved user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser exists in deleted container.

Actions

 $ ipa user-undel tuser

Expected results

Preserved user is removed from deleted container and is located in active container. Verify that original ipaUniqueID, uidNumber and gidNumber are preserved. Verify that the reactivated user is member of ipausers group.

Test case: Try to restore a preserved user into staged area

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser exists in deleted container.

Actions

 $ ipa user-stage tuser

Expected results

Preserved user is removed from deleted container and is located in staged container. Verify that original ipaUniqueID, uidNumber and gidNumber are preserved.

Test case: Try to permanently delete a preserved user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestPreserved

Setup

User tuser exists in deleted container.

Actions

 $ ipa user-del tuser

Expected results

Preserved user is removed from deleted container. Verify that the user is not found by 'user-show' command.

Test case: Try to make staged user a manager of active user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestManagers

Setup

Active user tuser and staged user muser exist.

Actions

 $ ipa user-mod tuser --manager muser

Expected results

Should fail.

Test case: Try to make preserved user a manager of active user

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestManagers

Setup

Active user tuser and user muser in deleted container exist.

Actions

 $ ipa user-mod tuser --manager muser

Expected results

Should fail.

Test case: Try to temporarily delete a user that is a manager

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestManagers

Setup

Active users tuser and muser exist.

Actions

 $ ipa user-del muser --preserve

Expected results

User muser is moved to deleted container. Verify that user tuser has no longer a manager attribute specified.

Test case: Try to assign membership to a user in staged or deleted container

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestGroups

Setup

Group testgroup, user tuser1 in deleted container and staged user tuser2 exist.

Actions

 $ ipa group-add-member testgroup --user tuser1
 $ ipa group-add-member testgroup --user tuser2

Expected results

Both commands should fail.

Test case: Verify that a user is deleted from a group when deleted --preserve.

Autotest

ipatests/test_xmlrpc/test_stageuser_plugin.py:TestGroups

Setup

Group testgroup and active user tuser1 exist.

Actions

Make tuser a member of testgroup.

 $ ipa group-add-member testgroup --user tuser1

Delete tuser with --preserve.

 $ ipa user-del tuser --preserve

Expected results

The user should be deleted (stored in deleted container). The group testgroup should no longer have a member tuser.

Test case: Verify multiple managers can be added to a staged user

Autotest

{{{autotest}}}

Setup

Staged user tuser1 exists. Two active users muser1 and muser2 exist.

Actions

Add the two active users as managers of staged user:

 $ ipa stageuser-add-member tuser1 --users=muser1 --users=muser2 

Try to activate the staged user:

 $ ipa stageuser-activate tuser1 

Expected results

The managers should be added to the user. All managers should be preserved after activation.

Test case: Verify one or more managers can be removed from a staged user

Autotest

{{{autotest}}}

Setup

Staged user tuser1 with managers muser1, muser2 and muser3 exists.

Actions

Delete one manager with user-remove-manager command:

 $ ipa stageuser-remove-manager tuser1 --users muser1 

Delete remaining managers with user-remove-manager command:

 $ ipa stageuser-remove-manager tuser1 --users muser2 --users muser3 

Expected results

Managers should be removed.

Test case: Try adding a manager to nonexistent staged user

Autotest

{{{autotest}}}

Setup

Staged user nonexistent does not exist.

Actions

Try adding a manager to the user:

 ipa user-add-manager nonexistent --users=muser1

Expected results

Should fail.

Test case: Try adding a nonexistent user as manager to staged user

Autotest

{{{autotest}}}

Setup

Staged user tuser1 exists. Active user nonexistent does not exist.

Actions

Try adding a nonexistent manager to the staged user:

 ipa user-add-manager tuser1 --users=nonexistent

Expected results

Should fail.

Test case: Try remove a manager that is not assigned to a staged user

Autotest

{{{autotest}}}

Setup

Staged user tuser1 exists. Active user muser1 exists, but is not a manager of tuser1.

Actions

 ipa user-remove-manager tuser1 --users=muser1

Expected results

Should fail.