Re: [PATCH 2/5] t5550: break submodule config test into multiple sub-tests

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 28, 2016 at 6:37 AM, Jeff King <peff@xxxxxxxx> wrote:
> 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 <peff@xxxxxxxx>
> ---
>  t/t5550-http-fetch-dumb.sh | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/t/t5550-http-fetch-dumb.sh b/t/t5550-http-fetch-dumb.sh
> index 81cc57f..e8e91bb 100755
> --- a/t/t5550-http-fetch-dumb.sh
> +++ b/t/t5550-http-fetch-dumb.sh
> @@ -91,17 +91,21 @@ test_expect_success 'configured username does not override URL' '
>         expect_askpass pass user@host
>  '
>
> -test_expect_success 'cmdline credential config passes into submodules' '
> +test_expect_success 'set up repo with http submodules' '

set up or setup?

$ grep -r "set up" |wc -l
69
$ grep -r "setup" |wc -l
1162

Apart from that nit, this patch looks good to me.

>         git init super &&
>         set_askpass user@host pass@host &&
>         (
>                 cd super &&
>                 git submodule add "$HTTPD_URL/auth/dumb/repo.git" sub &&
>                 git commit -m "add submodule"
> -       ) &&
> +       )
> +'
> +
> +test_expect_success 'cmdline credential config passes to submodule via clone' '
>         set_askpass wrong pass@host &&
>         test_must_fail git clone --recursive super super-clone &&
>         rm -rf super-clone &&
> +
>         set_askpass wrong pass@host &&
>         git -c "credential.$HTTPD_URL.username=user@host" \
>                 clone --recursive super super-clone &&
> --
> 2.8.1.617.gbdccc2d
>
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]