diff options
author | Andreas Schneider <asn@samba.org> | 2022-04-22 15:46:05 +0200 |
---|---|---|
committer | Pavel Filipensky <pfilipensky@samba.org> | 2022-08-10 10:21:48 +0000 |
commit | 854a45ca24a8841a53fc5bcb46663f1204d6c24c (patch) | |
tree | 75b21f257f9cc8a44b122005b46bca3cf5efb286 /testprogs/blackbox/test_special_group.sh | |
parent | 2d64eafa8be952e4a6b25359ced51422ed00060b (diff) | |
download | samba-854a45ca24a8841a53fc5bcb46663f1204d6c24c.tar.gz |
testprogs: Reformat test_special_group.sh
shfmt -w -p -i 0 -fn testprogs/blackbox/test_special_group.sh
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Pavel Filipenský <pfilipensky@samba.org>
Autobuild-User(master): Pavel Filipensky <pfilipensky@samba.org>
Autobuild-Date(master): Wed Aug 10 10:21:48 UTC 2022 on sn-devel-184
Diffstat (limited to 'testprogs/blackbox/test_special_group.sh')
-rwxr-xr-x | testprogs/blackbox/test_special_group.sh | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/testprogs/blackbox/test_special_group.sh b/testprogs/blackbox/test_special_group.sh index 84bb95f7b8f..00b5dde5670 100755 --- a/testprogs/blackbox/test_special_group.sh +++ b/testprogs/blackbox/test_special_group.sh @@ -1,10 +1,10 @@ #!/bin/sh if [ $# -lt 1 ]; then -cat <<EOF + cat <<EOF Usage: $0 PREFIX EOF -exit 1; + exit 1 fi PREFIX_ABS="$1" @@ -12,40 +12,42 @@ shift 1 failed=0 -. `dirname $0`/subunit.sh -. `dirname $0`/common_test_fns.inc +. $(dirname $0)/subunit.sh +. $(dirname $0)/common_test_fns.inc OLD_RELEASE="release-4-5-0-pre1" old_release_dir="$SRCDIR_ABS/source4/selftest/provisions/$OLD_RELEASE" samba_tdbrestore="tdbrestore" if [ -x "$BINDIR/tdbrestore" ]; then - samba_tdbrestore="$BINDIR/tdbrestore" + samba_tdbrestore="$BINDIR/tdbrestore" fi samba_undump="$SRCDIR_ABS/source4/selftest/provisions/undump.sh" cleanup_output_directories() { - remove_directory $PREFIX_ABS/$OLD_RELEASE + remove_directory $PREFIX_ABS/$OLD_RELEASE } -undump_old() { - $samba_undump $old_release_dir $PREFIX_ABS/$OLD_RELEASE $samba_tdbrestore +undump_old() +{ + $samba_undump $old_release_dir $PREFIX_ABS/$OLD_RELEASE $samba_tdbrestore } -add_special_group() { - $PYTHON $BINDIR/samba-tool group add 'protected users' --special -H tdb://$PREFIX_ABS/$OLD_RELEASE/private/sam.ldb +add_special_group() +{ + $PYTHON $BINDIR/samba-tool group add 'protected users' --special -H tdb://$PREFIX_ABS/$OLD_RELEASE/private/sam.ldb } # double-check we cleaned up from the last test run cleanup_output_directories -testit $OLD_RELEASE undump_old || failed=`expr $failed + 1` +testit $OLD_RELEASE undump_old || failed=$(expr $failed + 1) -testit "add_special_group" add_special_group || failed=`expr $failed + 1` +testit "add_special_group" add_special_group || failed=$(expr $failed + 1) -testit_expect_failure_grep "add_duplicate_special_group" "Failed to add group.*already exists" add_special_group || failed=`expr $failed + 1` +testit_expect_failure_grep "add_duplicate_special_group" "Failed to add group.*already exists" add_special_group || failed=$(expr $failed + 1) cleanup_output_directories |