ZTS: privilege group path cleanup
Removing hardcoded paths in privilege group tests Reviewed-by: George Melikov <mail@gmelikov.ru> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: bunder2015 <omfgbunder@gmail.com> Closes #7803
This commit is contained in:
parent
089b16f48d
commit
5468ee7a2f
|
@ -37,10 +37,10 @@ fi
|
|||
|
||||
verify_runnable "global"
|
||||
|
||||
ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
|
||||
ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
|
||||
[[ -z $ZFS_USER ]] && log_fail "no ZFS_USER found"
|
||||
|
||||
USES_NIS=$(cat /tmp/zfs-privs-test-nis.txt)
|
||||
USES_NIS=$(cat $TEST_BASE_DIR/zfs-privs-test-nis.txt)
|
||||
|
||||
if [ "${USES_NIS}" == "true" ]
|
||||
then
|
||||
|
@ -49,7 +49,7 @@ fi
|
|||
|
||||
userdel $ZFS_USER
|
||||
[[ -d /export/home/$ZFS_USER ]] && rm -rf /export/home/$ZFS_USER
|
||||
rm /tmp/zfs-privs-test-nis.txt
|
||||
rm /tmp/zfs-privs-test-user.txt
|
||||
rm $TEST_BASE_DIR/zfs-privs-test-nis.txt
|
||||
rm $TEST_BASE_DIR/zfs-privs-test-user.txt
|
||||
|
||||
default_cleanup
|
||||
|
|
|
@ -63,7 +63,7 @@ fi
|
|||
|
||||
log_assert "The RBAC profile \"ZFS Storage Management\" works"
|
||||
|
||||
ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
|
||||
ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
|
||||
|
||||
# the user shouldn't be able to do anything initially
|
||||
log_mustnot user_run $ZFS_USER "zpool create $TESTPOOL $DISKS"
|
||||
|
|
|
@ -66,7 +66,7 @@ fi
|
|||
|
||||
log_assert "The RBAC profile \"ZFS File System Management\" works"
|
||||
|
||||
ZFS_USER=$(cat /tmp/zfs-privs-test-user.txt)
|
||||
ZFS_USER=$(cat $TEST_BASE_DIR/zfs-privs-test-user.txt)
|
||||
|
||||
# Set a $DATASET where we can create child files systems
|
||||
if is_global_zone; then
|
||||
|
|
|
@ -65,7 +65,7 @@ done
|
|||
log_must mkdir -p /export/home/$ZFS_USER
|
||||
log_must useradd -c "ZFS Privileges Test User" -d /export/home/$ZFS_USER $ZFS_USER
|
||||
|
||||
echo $ZFS_USER > /tmp/zfs-privs-test-user.txt
|
||||
echo $USES_NIS > /tmp/zfs-privs-test-nis.txt
|
||||
echo $ZFS_USER > $TEST_BASE_DIR/zfs-privs-test-user.txt
|
||||
echo $USES_NIS > $TEST_BASE_DIR/zfs-privs-test-nis.txt
|
||||
|
||||
log_pass
|
||||
|
|
Loading…
Reference in New Issue