fix 'C' and 'M' tests in 'gitolite access'...
[gitolite.git] / t / invalid-refnames-filenames.t
blob19267fe99adf63875535d8b24410ed61a63d3040
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
5 # this is hardcoded; change it if needed
6 use lib "src/lib";
7 use Gitolite::Test;
9 # invalid refnames
10 # ----------------------------------------------------------------------
12 try "plan 56";
13 try "DEF POK = !/DENIED/; !/failed to push/";
15 confreset; confadd '
16 repo aa
17 RW+ = @all
20 try "ADMIN_PUSH set1; !/FATAL/" or die text();
22 try "
24 cd ..
25 rm -rf aa
26 glt clone u1 file:///aa
27 cd aa
28 tc v-869
30 glt push u1 origin HEAD
31 /To file:///aa/
32 POK; /\\* \\[new branch\\] HEAD -> master/
34 # push file aa,bb ok
35 tc aa,bb
36 glt push u1 origin HEAD
37 /To file:///aa/
38 POK; /HEAD -> master/
40 # push file aa=bb ok
41 tc aa=bb
42 glt push u1 origin HEAD
43 /To file:///aa/
44 POK; /HEAD -> master/
46 # push to branch dd,ee ok
47 glt push u1 origin master:dd,ee
48 /To file:///aa/
49 POK; /\\* \\[new branch\\] master -> dd,ee/
51 # push to branch dd=ee fail
52 glt push u1 origin master:dd=ee
53 /invalid characters in ref or filename: \\'refs/heads/dd=ee/
54 reject
57 confreset; confadd '
58 repo aa
59 RW+ = @all
60 RW+ NAME/ = @all
63 try "ADMIN_PUSH set1; !/FATAL/" or die text();
65 try "
67 cd ..
68 rm -rf aa
69 glt clone u1 file:///aa
70 cd aa
71 tc file-1
73 glt push u1 origin HEAD
74 /To file:///aa/
75 POK; /\\* \\[new branch\\] HEAD -> master/
77 # push file aa,bb ok
78 tc aa,bb
79 glt push u1 origin HEAD
80 /To file:///aa/
81 POK; /HEAD -> master/
83 # push file aa=bb fail
84 tc aa=bb
85 glt push u1 origin HEAD
86 /To file:///aa/
87 POK; /HEAD -> master/
89 # push to branch dd,ee ok
90 git reset --hard HEAD^
91 tc some-file
92 glt push u1 origin master:dd,ee
93 /To file:///aa/
94 POK; /\\* \\[new branch\\] master -> dd,ee/
96 # push to branch dd=ee fail
97 glt push u1 origin master:dd=ee
98 /invalid characters in ref or filename: \\'refs/heads/dd=ee/
99 reject