Skip to content

Commit

Permalink
Enable receive.fsckObjects in tests
Browse files Browse the repository at this point in the history
We have this enabled in our prod config, and it changes
spokes-receive-pack in important ways. In particular, it makes
spokes-receive-pack care about bad dates, which we want to disable
sometimes. So let's enable it here (and update the existing tests to
match the new behavior.
  • Loading branch information
spraints committed Nov 14, 2024
1 parent c428812 commit adecdda
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ go-test-integration:

# Add our compiled `spokes-receive-pack` to the PATH while running tests:
PATH="$(CURDIR)/bin:$(PATH)" \
GIT_CONFIG_SYSTEM="$(CURDIR)/internal/integration/testdata/gitconfig" \
$(GO) test $(TESTINTEGRATIONFLAGS) $(TESTSUITE) 2>&1

@echo "$(M) disabling failpoints ..."
Expand Down
4 changes: 2 additions & 2 deletions internal/integration/missingobjects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ func TestMissingObjects(t *testing.T) {
refStatus, unpackRes, _, err := readResult(t, srp.Out)
require.NoError(t, err)
assert.Equal(t, map[string]string{
info.Ref: "ng missing necessary objects",
info.Ref: "ng error processing packfiles: exit status 128",
}, refStatus)
assert.Equal(t, "unpack ok\n", unpackRes)
assert.Equal(t, "unpack index-pack failed\n", unpackRes)
}

func TestDeleteAndUpdate(t *testing.T) {
Expand Down
4 changes: 4 additions & 0 deletions internal/integration/testdata/gitconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# This file has a subset of options from our prod /etc/gitconfig.

[receive]
fsckObjects = true

0 comments on commit adecdda

Please sign in to comment.