(test suite) stop using 'ls' to test for presence/absence of files/directories
another of those "duh! what was I thinking" moments, this specific one being "why test that files/directories are created with the right user and group IDs? Shouldn't that be out of your control, as well as totally unnecessary on a sane system?"
This commit is contained in:
parent
4eb8cd4ad1
commit
a802071a5e
5 changed files with 14 additions and 15 deletions
|
@ -11,7 +11,7 @@ my $rb = `gitolite query-rc -n GL_REPO_BASE`;
|
||||||
# initial smoke tests
|
# initial smoke tests
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
try "plan 73";
|
try "plan 71";
|
||||||
|
|
||||||
# basic push admin repo
|
# basic push admin repo
|
||||||
confreset;confadd '
|
confreset;confadd '
|
||||||
|
@ -33,12 +33,11 @@ try "
|
||||||
cd ..
|
cd ..
|
||||||
glt clone u1 file://aa u1aa; ok; /Cloning into 'u1aa'.../
|
glt clone u1 file://aa u1aa; ok; /Cloning into 'u1aa'.../
|
||||||
/warning: You appear to have cloned an empty repository/
|
/warning: You appear to have cloned an empty repository/
|
||||||
ls -ald --time-style=long-iso u1aa;
|
[ -d u1aa ]; ok
|
||||||
ok; /drwxr-xr-x 3 $ENV{USER} $ENV{USER} \\d+ 201.-..-.. ..:.. u1aa/
|
|
||||||
|
|
||||||
# basic clone deny
|
# basic clone deny
|
||||||
glt clone u4 file://aa u4aa; !ok; /R any aa u4 DENIED by fallthru/
|
glt clone u4 file://aa u4aa; !ok; /R any aa u4 DENIED by fallthru/
|
||||||
ls -ald u4aa; !ok; /ls: cannot access u4aa: No such file or directory/
|
[ -d u4aa ]; !ok
|
||||||
|
|
||||||
# basic push
|
# basic push
|
||||||
cd u1aa; ok
|
cd u1aa; ok
|
||||||
|
|
|
@ -10,7 +10,7 @@ use Gitolite::Test;
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
try "
|
try "
|
||||||
plan 218
|
plan 217
|
||||||
CHECK_SETUP
|
CHECK_SETUP
|
||||||
|
|
||||||
# subtest 1
|
# subtest 1
|
||||||
|
@ -77,7 +77,7 @@ try "
|
||||||
/fatal: The remote end hung up unexpectedly/
|
/fatal: The remote end hung up unexpectedly/
|
||||||
CLONE u2 t1; ok; gsh
|
CLONE u2 t1; ok; gsh
|
||||||
/warning: You appear to have cloned an empty repository./
|
/warning: You appear to have cloned an empty repository./
|
||||||
ls -al t1; ok; /$ENV{USER}.*$ENV{USER}.*\.git/
|
[ -d t1/.git ]; ok
|
||||||
cd t1; ok;
|
cd t1; ok;
|
||||||
|
|
||||||
# push
|
# push
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Gitolite::Test;
|
||||||
# merge check -- the M flag
|
# merge check -- the M flag
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
try "plan 57";
|
try "plan 55";
|
||||||
|
|
||||||
confreset;confadd '
|
confreset;confadd '
|
||||||
repo foo
|
repo foo
|
||||||
|
@ -25,7 +25,7 @@ try "ADMIN_PUSH set1; !/FATAL/" or die text();
|
||||||
|
|
||||||
try "
|
try "
|
||||||
cd ..
|
cd ..
|
||||||
ls -al foo; !ok; /cannot access foo: No such file or directory/
|
[ -d foo ]; !ok
|
||||||
glt clone u1 file:///foo
|
glt clone u1 file:///foo
|
||||||
ok; /Cloning into/
|
ok; /Cloning into/
|
||||||
/You appear to have cloned an empty/
|
/You appear to have cloned an empty/
|
||||||
|
@ -33,7 +33,7 @@ try "
|
||||||
|
|
||||||
try "
|
try "
|
||||||
cd foo; ok
|
cd foo; ok
|
||||||
ls -Al; ok; /\.git/
|
[ -d .git ]; ok
|
||||||
test-commit aa; ok; /1 file changed, 1 insertion/
|
test-commit aa; ok; /1 file changed, 1 insertion/
|
||||||
tag start; ok
|
tag start; ok
|
||||||
glt push u1 origin master
|
glt push u1 origin master
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Gitolite::Test;
|
||||||
# VREFs - part 1
|
# VREFs - part 1
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
try "plan 90";
|
try "plan 88";
|
||||||
|
|
||||||
put "conf/gitolite.conf", "
|
put "conf/gitolite.conf", "
|
||||||
repo gitolite-admin
|
repo gitolite-admin
|
||||||
|
@ -32,11 +32,11 @@ put "conf/gitolite.conf", "
|
||||||
try "
|
try "
|
||||||
ADMIN_PUSH vr1a
|
ADMIN_PUSH vr1a
|
||||||
cd ..
|
cd ..
|
||||||
ls -al foo; !ok; /cannot access foo: No such file or directory/
|
[ -d foo ]; !ok
|
||||||
CLONE u1 foo; ok; /Cloning into/
|
CLONE u1 foo; ok; /Cloning into/
|
||||||
/You appear to have cloned an empty/
|
/You appear to have cloned an empty/
|
||||||
cd foo; ok
|
cd foo; ok
|
||||||
ls -Al; ok; /\.git/
|
[ -d .git ]; ok
|
||||||
|
|
||||||
# VREF not called for u1
|
# VREF not called for u1
|
||||||
tc a1 a2 a3 a4 a5; ok; /aaf9e8e/
|
tc a1 a2 a3 a4 a5; ok; /aaf9e8e/
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Gitolite::Test;
|
||||||
# VREFs - part 2
|
# VREFs - part 2
|
||||||
# ----------------------------------------------------------------------
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
try "plan 74";
|
try "plan 72";
|
||||||
|
|
||||||
put "../gitolite-admin/conf/gitolite.conf", "
|
put "../gitolite-admin/conf/gitolite.conf", "
|
||||||
\@gfoo = foo
|
\@gfoo = foo
|
||||||
|
@ -32,11 +32,11 @@ try "
|
||||||
ADMIN_PUSH vr2a
|
ADMIN_PUSH vr2a
|
||||||
cd ..
|
cd ..
|
||||||
# setup
|
# setup
|
||||||
ls -al foo; !ok; /cannot access foo: No such file or directory/
|
[ -d foo ]; !ok
|
||||||
CLONE u1 foo; ok; /Cloning into/
|
CLONE u1 foo; ok; /Cloning into/
|
||||||
/You appear to have cloned an empty/
|
/You appear to have cloned an empty/
|
||||||
cd foo; ok
|
cd foo; ok
|
||||||
ls -Al; ok; /\.git/
|
[ -d .git ]; ok
|
||||||
|
|
||||||
# u1 push 15 new files
|
# u1 push 15 new files
|
||||||
tc a b c d e f g h i j k l m n o
|
tc a b c d e f g h i j k l m n o
|
||||||
|
|
Loading…
Reference in a new issue