Skip to content

Commit 05cd3a0

Browse files
peffdscho
authored andcommitted
t5550: break submodule config test into multiple sub-tests
Right now we test only the cloning case, but there are other interesting cases (e.g., fetching). Let's pull the setup bits into their own test, which will make things flow more logically once we start adding more tests which use the setup. Let's also introduce some whitespace to the clone-test to split the two parts: making sure it fails without our cmdline config, and that it succeeds with it. Signed-off-by: Jeff King <[email protected]> Signed-off-by: Junio C Hamano <[email protected]> Signed-off-by: Johannes Schindelin <[email protected]>
1 parent 1c6e2e2 commit 05cd3a0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

t/t5550-http-fetch-dumb.sh

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,17 +91,21 @@ test_expect_success 'configured username does not override URL' '
9191
expect_askpass pass user@host
9292
'
9393

94-
test_expect_success 'cmdline credential config passes into submodules' '
94+
test_expect_success 'set up repo with http submodules' '
9595
git init super &&
9696
set_askpass user@host pass@host &&
9797
(
9898
cd super &&
9999
git submodule add "$HTTPD_URL/auth/dumb/repo.git" sub &&
100100
git commit -m "add submodule"
101-
) &&
101+
)
102+
'
103+
104+
test_expect_success 'cmdline credential config passes to submodule via clone' '
102105
set_askpass wrong pass@host &&
103106
test_must_fail git clone --recursive super super-clone &&
104107
rm -rf super-clone &&
108+
105109
set_askpass wrong pass@host &&
106110
git -c "credential.$HTTPD_URL.username=user@host" \
107111
clone --recursive super super-clone &&

0 commit comments

Comments
 (0)