[PATCH v2 19/22] t5703: switch tests to use test_oid
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Jan 25, 2020, 23:00 UTC
- Message-ID
- <20200125230035.136348-23-sandals@crustytoothpaste.net>
- In-Reply-To
- <20200125230035.136348-1-sandals@crustytoothpaste.net>
To make this test work correctly with SHA-256, switch the hard-coded invalid object IDs to use test_oid.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> --- t/t5703-upload-pack-ref-in-want.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/t/t5703-upload-pack-ref-in-want.sh b/t/t5703-upload-pack-ref-in-want.sh index 5511cdcec2..8aeeaac509 100755 --- a/t/t5703-upload-pack-ref-in-want.sh +++ b/t/t5703-upload-pack-ref-in-want.sh @@ -37,6 +37,7 @@ check_output () { # \ | / # a test_expect_success 'setup repository' ' + test_oid_init && test_commit a && git checkout -b o/foo && test_commit b && @@ -333,7 +334,7 @@ test_expect_success 'server is initially ahead - no ref in want' ' git -C "$REPO" config uploadpack.allowRefInWant false && rm -rf local && cp -r "$LOCAL_PRISTINE" local && - inconsistency master 1234567890123456789012345678901234567890 && + inconsistency master $(test_oid numeric) && test_must_fail git -C local fetch 2>err && test_i18ngrep "fatal: remote error: upload-pack: not our ref" err ' @@ -342,7 +343,7 @@ test_expect_success 'server is initially ahead - ref in want' ' git -C "$REPO" config uploadpack.allowRefInWant true && rm -rf local && cp -r "$LOCAL_PRISTINE" local && - inconsistency master 1234567890123456789012345678901234567890 && + inconsistency master $(test_oid numeric) && git -C local fetch && git -C "$REPO" rev-parse --verify master >expected &&