diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-06-29 11:26:31 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2023-07-05 17:48:03 +0300 |
commit | 18a8787b5e100377ef33126f7e06a9342924fa42 (patch) | |
tree | 47e22258064b8d83778c81ecffd8f88d16f45d8d | |
parent | a6fba8bf12c847832b26b3fc579f3a832305fbe7 (diff) |
smarthttp: Enable testing PostReceivePack with SHA256 object format
Enable testing the PostReceivePack RPC with the SHA256 object format.
Note that we need to change one of the tests to assert a shortened
expected response. This is because Git now wraps the response into
multiple pktlines due to the longer object ID.
-rw-r--r-- | internal/gitaly/service/smarthttp/receive_pack_test.go | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/internal/gitaly/service/smarthttp/receive_pack_test.go b/internal/gitaly/service/smarthttp/receive_pack_test.go index 09284a516..a1d0cfff1 100644 --- a/internal/gitaly/service/smarthttp/receive_pack_test.go +++ b/internal/gitaly/service/smarthttp/receive_pack_test.go @@ -1,5 +1,3 @@ -//go:build !gitaly_test_sha256 - package smarthttp import ( @@ -594,7 +592,7 @@ func TestPostReceivePack_fsck(t *testing.T) { GlRepository: "project-456", }) - require.Contains(t, response, "duplicateEntries: contains duplicate file entries") + require.Contains(t, response, "duplicateEntries: contains duplicate file") } func TestPostReceivePack_hooks(t *testing.T) { @@ -895,7 +893,7 @@ func setupPush(t *testing.T, ctx context.Context, cfg config.Cfg, sourceRepoPath for i, refUpdate := range refUpdates { pktline := fmt.Sprintf("%s %s %s", refUpdate.from, refUpdate.to, refUpdate.ref) if i == 0 { - pktline += "\x00 report-status side-band-64k agent=git/2.12.0" + pktline += fmt.Sprintf("\x00 report-status side-band-64k object-format=%s agent=git/2.12.0", gittest.DefaultObjectHash.Format) } gittest.WritePktlineString(t, &request, pktline) |