Skip to content

Commit 726800a

Browse files
peffgitster
authored andcommitted
t5550: put auth-required repo in auth/dumb
In most of our tests, we put repos to be accessed by dumb protocols in /dumb, and repos to be accessed by smart protocols in /smart. In our test apache setup, the whole /auth hierarchy requires authentication. However, we don't bother to split it by smart and dumb here because we are not currently testing smart-http authentication at all. That will change in future patches, so let's be explicit that we are interested in testing dumb access here. This also happens to match what t5540 does for the push tests. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 785ee49 commit 726800a

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

t/t5550-http-fetch.sh

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,9 @@ test_expect_success 'clone http repository' '
4141
'
4242

4343
test_expect_success 'create password-protected repository' '
44-
mkdir "$HTTPD_DOCUMENT_ROOT_PATH/auth/" &&
44+
mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/" &&
4545
cp -Rf "$HTTPD_DOCUMENT_ROOT_PATH/repo.git" \
46-
"$HTTPD_DOCUMENT_ROOT_PATH/auth/repo.git"
46+
"$HTTPD_DOCUMENT_ROOT_PATH/auth/dumb/repo.git"
4747
'
4848

4949
test_expect_success 'setup askpass helpers' '
@@ -81,28 +81,28 @@ expect_askpass() {
8181
test_expect_success 'cloning password-protected repository can fail' '
8282
>askpass-query &&
8383
echo wrong >askpass-response &&
84-
test_must_fail git clone "$HTTPD_URL/auth/repo.git" clone-auth-fail &&
84+
test_must_fail git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-fail &&
8585
expect_askpass both wrong
8686
'
8787

8888
test_expect_success 'http auth can use user/pass in URL' '
8989
>askpass-query &&
9090
echo wrong >askpass-response &&
91-
git clone "$HTTPD_URL_USER_PASS/auth/repo.git" clone-auth-none &&
91+
git clone "$HTTPD_URL_USER_PASS/auth/dumb/repo.git" clone-auth-none &&
9292
expect_askpass none
9393
'
9494

9595
test_expect_success 'http auth can use just user in URL' '
9696
>askpass-query &&
9797
echo user@host >askpass-response &&
98-
git clone "$HTTPD_URL_USER/auth/repo.git" clone-auth-pass &&
98+
git clone "$HTTPD_URL_USER/auth/dumb/repo.git" clone-auth-pass &&
9999
expect_askpass pass user@host
100100
'
101101

102102
test_expect_success 'http auth can request both user and pass' '
103103
>askpass-query &&
104104
echo user@host >askpass-response &&
105-
git clone "$HTTPD_URL/auth/repo.git" clone-auth-both &&
105+
git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-both &&
106106
expect_askpass both user@host
107107
'
108108

@@ -114,23 +114,23 @@ test_expect_success 'http auth respects credential helper config' '
114114
}; f" &&
115115
>askpass-query &&
116116
echo wrong >askpass-response &&
117-
git clone "$HTTPD_URL/auth/repo.git" clone-auth-helper &&
117+
git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-helper &&
118118
expect_askpass none
119119
'
120120

121121
test_expect_success 'http auth can get username from config' '
122122
test_config_global "credential.$HTTPD_URL.username" user@host &&
123123
>askpass-query &&
124124
echo user@host >askpass-response &&
125-
git clone "$HTTPD_URL/auth/repo.git" clone-auth-user &&
125+
git clone "$HTTPD_URL/auth/dumb/repo.git" clone-auth-user &&
126126
expect_askpass pass user@host
127127
'
128128

129129
test_expect_success 'configured username does not override URL' '
130130
test_config_global "credential.$HTTPD_URL.username" wrong &&
131131
>askpass-query &&
132132
echo user@host >askpass-response &&
133-
git clone "$HTTPD_URL_USER/auth/repo.git" clone-auth-user2 &&
133+
git clone "$HTTPD_URL_USER/auth/dumb/repo.git" clone-auth-user2 &&
134134
expect_askpass pass user@host
135135
'
136136

0 commit comments

Comments
 (0)