Re: [PATCH v6 26/27] t1406: new tests for submodule ref store

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

 



On 03/18/2017 03:03 AM, Nguyễn Thái Ngọc Duy wrote:
> Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@xxxxxxxxx>
> ---
>  t/t1406-submodule-ref-store.sh (new +x) | 95 +++++++++++++++++++++++++++++++++
>  1 file changed, 95 insertions(+)
>  create mode 100755 t/t1406-submodule-ref-store.sh
> 
> diff --git a/t/t1406-submodule-ref-store.sh b/t/t1406-submodule-ref-store.sh
> new file mode 100755
> index 0000000000..22214ebd32
> --- /dev/null
> +++ b/t/t1406-submodule-ref-store.sh
> @@ -0,0 +1,95 @@
> +#!/bin/sh
> +
> +test_description='test submodule ref store api'
> +
> +. ./test-lib.sh
> +
> +RUN="test-ref-store submodule:sub"
> +
> +test_expect_success 'setup' '
> +	git init sub &&
> +	(
> +		cd sub &&
> +		test_commit first &&
> +		git checkout -b new-master
> +	)
> +'
> +
> +test_expect_success 'pack_refs() not allowed' '
> +	test_must_fail $RUN pack-refs 3
> +'

It's a little bit unfortunate but probably OK that this test and its
analog in t1405 hard-code internal numerical constants. At least in
t1405 the names of the constants appear in the test name, meaning that
anybody changing the constants' values in the future will probably find
the "3" in that file. Would you do the same here, please, or at least
mention the constant names in a comment here?

> [...]

Michael




[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]