summaryrefslogtreecommitdiff
path: root/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp')
-rwxr-xr-xtests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp41
1 files changed, 0 insertions, 41 deletions
diff --git a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp b/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp
deleted file mode 100755
index 5b5c7808..00000000
--- a/tests/grouptools/groupmems/23_groupmems_user_add_user-not_in_groups/run_groupmems.exp
+++ /dev/null
@@ -1,41 +0,0 @@
-#!/usr/bin/expect
-
-set timeout 2
-expect_after default {puts "\nFAIL"; exit 1}
-
-if {$argc != 0} {
- puts "usage: run_groupmems.exp"
- exit 1
-}
-
-# First, switch to the testsuite user
-# (otherwise, no password will be asked)
-send_user "# switch to the 'myuser' user\n"
-send_user "# and expect a '$ ' prompt\n"
-spawn /bin/su myuser
-
-expect "$ " ;# Wait for the prompt
-
-send_user "\n# make sure we are now 'myuser'"
-send_user "\n# id should return 'uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)'"
-send "\r" ;# restore the prompt for the logs
-send "id\r" ;# Verify we are really testsuite
-
-expect "uid=424242(myuser) gid=424242(myuser) groups=424242(myuser)"
-
-expect "$ " ;# Wait for the prompt
-
-send_user "\n\n"
-send_user "# now add user utest1 to the myuser group\n"
-send_user "# and expect a password prompt"
-send "\r" ;# restore the prompt for the logs
-send "/usr/sbin/groupmems -a utest1\r" ;#
-expect "groupmems: Permission denied"
-expect "$ " ;# Wait for the prompt
-send "echo $?\r"
-expect "126\r"
-expect "$ " ;# Wait for the prompt
-close
-
-puts "\nPASS"
-exit 0