diff options
author | 2013-05-23 02:57:27 +0000 | |
---|---|---|
committer | 2014-08-23 09:50:53 -0700 | |
commit | a339058c93723d0153f0c7665fd8aba0b9543b19 (patch) | |
tree | 9473bb6f092b56dbef3f83a30f5c55195e054a2f | |
parent | Use Bash (diff) | |
download | gitolite-gentoo-a339058c93723d0153f0c7665fd8aba0b9543b19.tar.gz gitolite-gentoo-a339058c93723d0153f0c7665fd8aba0b9543b19.tar.bz2 gitolite-gentoo-a339058c93723d0153f0c7665fd8aba0b9543b19.zip |
Do not assume that the test user is in a group of the same name.
Signed-off-by: Robin H. Johnson <robbat2@gentoo.org>
-rw-r--r-- | t/t00-initial | 2 | ||||
-rw-r--r-- | t/t10-all-yall | 2 | ||||
-rw-r--r-- | t/t11-deny-repo | 2 | ||||
-rw-r--r-- | t/t57-daemon-gitweb | 30 | ||||
-rw-r--r-- | t/t58-daemon-gitweb-wild | 88 | ||||
-rw-r--r-- | t/t60-daemon-gitweb-via-setperms | 120 | ||||
-rw-r--r-- | t/t64-write-able | 6 | ||||
-rw-r--r-- | t/t67-hub | 2 | ||||
-rwxr-xr-x | t/test-driver.sh | 1 |
9 files changed, 127 insertions, 126 deletions
diff --git a/t/t00-initial b/t/t00-initial index 82b3ed4..0d433dd 100644 --- a/t/t00-initial +++ b/t/t00-initial @@ -22,7 +22,7 @@ runlocal git clone u1:aa u1aa expect "Cloning into 'u1aa'..." expect "warning: You appear to have cloned an empty repository" runlocal ls -ald --time-style=long-iso u1aa -expect "drwxr-xr-x 3 $USER $USER 4096 201.-..-.. ..:.. u1aa" +expect "drwxr-xr-x 3 $USER $GROUP 4096 201.-..-.. ..:.. u1aa" # ---------- name "basic clone deny" diff --git a/t/t10-all-yall b/t/t10-all-yall index 51d1f24..c8ac746 100644 --- a/t/t10-all-yall +++ b/t/t10-all-yall @@ -1,7 +1,7 @@ # vim: syn=sh: has_export_ok() { runremote ls -al $TEST_BASE_FULL/$1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE_FULL/$1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE_FULL/$1.git/git-daemon-export-ok" } does_not_have_export_ok() { diff --git a/t/t11-deny-repo b/t/t11-deny-repo index 6974003..0c93237 100644 --- a/t/t11-deny-repo +++ b/t/t11-deny-repo @@ -44,7 +44,7 @@ cannot_push() { has_export_ok() { runremote ls -al $TEST_BASE_FULL/$1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE_FULL/$1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE_FULL/$1.git/git-daemon-export-ok" } does_not_have_export_ok() { diff --git a/t/t57-daemon-gitweb b/t/t57-daemon-gitweb index ff23f22..192b9b7 100644 --- a/t/t57-daemon-gitweb +++ b/t/t57-daemon-gitweb @@ -17,7 +17,7 @@ do name "daemon access for testing repo" runremote ls -al $TEST_BASE/testing.git/git-daemon-export-ok [ "$ais" = "0" ] && expect "ls: cannot access $TEST_BASE/testing.git/git-daemon-export-ok: No such file or directory" - [ "$ais" = "1" ] && expect "$USER $USER .* $TEST_BASE/testing.git/git-daemon-export-ok" + [ "$ais" = "1" ] && expect "$USER $GROUP .* $TEST_BASE/testing.git/git-daemon-export-ok" name "INTERNAL" echo " @@ -33,8 +33,8 @@ do runremote ls -al $TEST_BASE/bar.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -44,10 +44,10 @@ do R = daemon " | ugc runremote ls -al $TEST_BASE/bar.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" name "add foo with gitweb access" echo " @@ -62,8 +62,8 @@ do " | ugc expect_push_ok "master -> master" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 8 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 20 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 8 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 20 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -76,8 +76,8 @@ do " | ugc expect_push_ok "master -> master" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 16 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 28 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -95,8 +95,8 @@ do expect_push_ok "master -> master" expect "remote: Initialized empty Git repository in $TEST_BASE_FULL/baz.git/" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 24 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 36 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 24 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 36 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -104,7 +104,7 @@ do expect "bar.git" expect "baz.git" runremote ls -al $TEST_BASE/baz.git/description - expect "$USER $USER 17 .* $TEST_BASE/baz.git/description" + expect "$USER $GROUP 17 .* $TEST_BASE/baz.git/description" runremote cat $TEST_BASE/baz.git/description expect "this is repo baz" @@ -114,7 +114,7 @@ do " | ugc expect_push_ok "master -> master" runremote ls -al projects.list - expect "$USER $USER 36 .* projects.list" + expect "$USER $GROUP 36 .* projects.list" runremote cat projects.list expect "testing.git" expect "foo.git" @@ -124,7 +124,7 @@ do expect "\[gitweb\]" expect "owner = sitaram" runremote ls -al $TEST_BASE/testing.git/description - expect "$USER $USER 25 .* $TEST_BASE/testing.git/description" + expect "$USER $GROUP 25 .* $TEST_BASE/testing.git/description" runremote cat $TEST_BASE/testing.git/description expect "this is the testing repo" diff --git a/t/t58-daemon-gitweb-wild b/t/t58-daemon-gitweb-wild index f76b6c8..bfdfccc 100644 --- a/t/t58-daemon-gitweb-wild +++ b/t/t58-daemon-gitweb-wild @@ -27,8 +27,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -39,18 +39,18 @@ do R = daemon " | ugc runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" name "add one more repo" runlocal git ls-remote u1:bar/u1/try2 runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -63,8 +63,8 @@ do bar/u1/try3 = \"this is bar/u1/try3\" " | ugc runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 16 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 28 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -77,10 +77,10 @@ do name "add try3 project" runlocal git ls-remote u1:bar/u1/try3 runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 16 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 28 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -96,10 +96,10 @@ do echo " " | ugc runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 32 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 44 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 32 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 44 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -119,8 +119,8 @@ do expect "\[gitweb\]" expect "owner = owner2" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 60 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 60 .* projects.list" runremote cat projects.list expect "bar/u1/try2.git" @@ -131,8 +131,8 @@ do " | ugc expect_push_ok "master -> master" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 60 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 60 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -143,8 +143,8 @@ do name "add try4 project" runlocal git ls-remote u1:bar/u1/try4 runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 64 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 76 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 64 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 76 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -188,8 +188,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -200,18 +200,18 @@ do R = daemon " | ugc runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" name "add one more repo" runlocal git ls-remote u1:bar/u1/try2 runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -224,8 +224,8 @@ do bar/u1/try3 = \"this is bar/u1/try3\" " | ugc runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 20 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 32 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 20 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 32 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -241,10 +241,10 @@ do name "add try3 project" runlocal git ls-remote u1:bar/u1/try3 runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 20 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 32 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 20 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 32 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -263,10 +263,10 @@ do echo " " | ugc runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 40 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 52 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 40 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 52 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -289,8 +289,8 @@ do expect "\[gitweb\]" expect "owner = owner2" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 72 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 72 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry2.git" @@ -301,8 +301,8 @@ do " | ugc expect_push_ok "master -> master" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 72 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 72 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" @@ -313,8 +313,8 @@ do name "add try4 project" runlocal git ls-remote u1:bar/u1/try4 runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 80 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 92 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 80 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 92 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "testing.git" [ "$ais" = "1" ] && expect "testing.git" diff --git a/t/t60-daemon-gitweb-via-setperms b/t/t60-daemon-gitweb-via-setperms index 489554c..d2c5aa1 100644 --- a/t/t60-daemon-gitweb-via-setperms +++ b/t/t60-daemon-gitweb-via-setperms @@ -28,8 +28,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try1.git" @@ -37,8 +37,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try2.git" @@ -47,10 +47,10 @@ do expect "READERS daemon" runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try1.git" @@ -61,8 +61,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 16 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 28 .* projects.list" runremote cat projects.list expect "bar/u1/try2.git" @@ -71,10 +71,10 @@ do name "add default daemon access" runlocal git ls-remote u1:bar/u1/try3 runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 16 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 28 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 16 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 28 .* projects.list" runremote cat projects.list notexpect "bar/u1/try3.git" @@ -85,8 +85,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try4.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try4.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 32 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 44 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 32 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 44 .* projects.list" runremote cat projects.list expect "bar/u1/try4.git" @@ -95,10 +95,10 @@ do runlocal git ls-remote u1:bar/u1/try5 runremote ls -al $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 60 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 60 .* projects.list" runremote cat projects.list expect "bar/u1/try5.git" @@ -107,10 +107,10 @@ do runlocal git ls-remote u1:bar/u1/try6 runremote ls -al $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 64 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 76 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 64 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 76 .* projects.list" runremote cat projects.list expect "bar/u1/try6.git" @@ -121,8 +121,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 60 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 60 .* projects.list" runremote cat projects.list notexpect "bar/u1/try6.git" @@ -132,10 +132,10 @@ do runlocal git ls-remote u1:bar/u1/try7 runremote ls -al $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok [ "$ais" = "0" ] && expect "ls: cannot access $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok: No such file or directory" - [ "$ais" = "1" ] && expect "$USER $USER .* $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok" + [ "$ais" = "1" ] && expect "$USER $GROUP .* $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 76 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 76 .* projects.list" runremote cat projects.list [ "$ais" = "0" ] && notexpect "bar/u1/try7.git" [ "$ais" = "1" ] && expect "bar/u1/try7.git" @@ -145,10 +145,10 @@ do runlocal git ls-remote u1:bar/u1/try8 runremote ls -al $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 48 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 76 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 48 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 76 .* projects.list" runremote cat projects.list notexpect "bar/u1/try8.git" @@ -159,8 +159,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try9.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try9.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 64 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 92 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 64 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 92 .* projects.list" runremote cat projects.list expect "bar/u1/try9.git" @@ -199,8 +199,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try1.git" @@ -208,8 +208,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try2.git" @@ -218,10 +218,10 @@ do expect "READERS daemon" runremote ls -al $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try1.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 0 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 12 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 0 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 12 .* projects.list" runremote cat projects.list notexpect "bar/u1/try1.git" @@ -232,8 +232,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try2.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 20 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 32 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 20 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 32 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry2.git" @@ -242,10 +242,10 @@ do name "add default daemon access" runlocal git ls-remote u1:bar/u1/try3 runremote ls -al $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try3.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 20 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 32 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 20 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 32 .* projects.list" runremote cat projects.list notexpect "bar%2Fu1%2Ftry3.git" @@ -256,8 +256,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try4.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try4.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 40 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 52 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 40 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 52 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry4.git" @@ -266,10 +266,10 @@ do runlocal git ls-remote u1:bar/u1/try5 runremote ls -al $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try5.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 72 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 72 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry5.git" @@ -278,10 +278,10 @@ do runlocal git ls-remote u1:bar/u1/try6 runremote ls -al $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 80 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 92 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 80 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 92 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry6.git" @@ -292,8 +292,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try6.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 72 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 72 .* projects.list" runremote cat projects.list notexpect "bar%2Fu1%2Ftry6.git" @@ -303,10 +303,10 @@ do runlocal git ls-remote u1:bar/u1/try7 runremote ls -al $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok [ "$ais" = "0" ] && expect "ls: cannot access $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok: No such file or directory" - [ "$ais" = "1" ] && expect "$USER $USER .* $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok" + [ "$ais" = "1" ] && expect "$USER $GROUP .* $TEST_BASE/bar/u1/try7.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 92 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 92 .* projects.list" runremote cat projects.list notexpect "bar/u1/try7.git" notexpect "bar/u1/try7.git" @@ -318,10 +318,10 @@ do runlocal git ls-remote u1:bar/u1/try8 runremote ls -al $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok - expect "$USER $USER .* $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok" + expect "$USER $GROUP .* $TEST_BASE/bar/u1/try8.git/git-daemon-export-ok" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 60 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 92 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 60 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 92 .* projects.list" runremote cat projects.list notexpect "bar%2Fu1%2Ftry8.git" @@ -332,8 +332,8 @@ do runremote ls -al $TEST_BASE/bar/u1/try9.git/git-daemon-export-ok expect "ls: cannot access $TEST_BASE/bar/u1/try9.git/git-daemon-export-ok: No such file or directory" runremote ls -al projects.list - [ "$ais" = "0" ] && expect "$USER $USER 80 .* projects.list" - [ "$ais" = "1" ] && expect "$USER $USER 112 .* projects.list" + [ "$ais" = "0" ] && expect "$USER $GROUP 80 .* projects.list" + [ "$ais" = "1" ] && expect "$USER $GROUP 112 .* projects.list" runremote cat projects.list expect "bar%2Fu1%2Ftry9.git" diff --git a/t/t64-write-able b/t/t64-write-able index 84acdf4..734b38a 100644 --- a/t/t64-write-able +++ b/t/t64-write-able @@ -61,7 +61,7 @@ do expect "^second line" expect "/home/$USER" runremote ls -al .gitolite.down - expect "^.rw------- 1 $USER $USER .. ... .. ..:.. .gitolite.down" + expect "^.rw------- 1 $USER $GROUP .. ... .. ..:.. .gitolite.down" name "u1 push foo fail" cd ~/td/foo @@ -109,7 +109,7 @@ do expect "foo down" expect "$TEST_BASE/foo.git" runremote ls -al $TEST_BASE/foo.git/.gitolite.down - expect ".rw------- 1 $USER $USER .* ..:.. $TEST_BASE/foo.git/.gitolite.down" + expect ".rw------- 1 $USER $GROUP .* ..:.. $TEST_BASE/foo.git/.gitolite.down" name "u1 push foo fail" cd ~/td/foo @@ -137,7 +137,7 @@ do expect "bar/u2/r1 down" expect "$TEST_BASE/bar/u2/r1.git" runremote ls -al $TEST_BASE/bar/u2/r1.git/.gitolite.down - expect ".rw------- 1 $USER $USER .. ... .. ..:.. $TEST_BASE/bar/u2/r1.git/.gitolite.down" + expect ".rw------- 1 $USER $GROUP .. ... .. ..:.. $TEST_BASE/bar/u2/r1.git/.gitolite.down" name "u1 push foo" cd ~/td/foo @@ -57,7 +57,7 @@ do cd ~/td runlocal ssh u2 fork r1 child/u2/myr1 runremote ls -al $TEST_BASE/child/u2/myr1.git/gl-forked-from - expect "$USER $USER 3 .* $TEST_BASE/child/u2/myr1.git/gl-forked-from" + expect "$USER $GROUP 3 .* $TEST_BASE/child/u2/myr1.git/gl-forked-from" runremote cat $TEST_BASE/child/u2/myr1.git/gl-forked-from expect r1 runlocal git clone u2:child/u2/myr1 diff --git a/t/test-driver.sh b/t/test-driver.sh index 7ab67f0..ba77f0d 100755 --- a/t/test-driver.sh +++ b/t/test-driver.sh @@ -2,6 +2,7 @@ # some defines export ADC_PATH="$HOME/glt-adc" +export GROUP="$(id -gn)" # are we in the right place cd ${0%/*} |