Skip to content

Commit fadd93a

Browse files
committed
integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove()
integrations: fix dropped error in lfsCommitAndPushTest()
1 parent 11208f3 commit fadd93a

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

integrations/git_test.go

+1
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@ func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS strin
162162
},
163163
Message: fmt.Sprintf("Testing commit @ %v", time.Now()),
164164
})
165+
assert.NoError(t, err)
165166
git.GlobalCommandArgs = oldGlobals
166167

167168
littleLFS, bigLFS = commitAndPushTest(t, dstPath, prefix)

integrations/repofiles_update_test.go

+7
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,14 @@ func TestCreateOrUpdateRepoFileForUpdateWithFileMove(t *testing.T) {
277277
expectedFileResponse := getExpectedFileResponseForRepofilesUpdate(commit.ID.String(), opts.TreePath)
278278
// assert that the old file no longer exists in the last commit of the branch
279279
fromEntry, err := commit.GetTreeEntryByPath(opts.FromTreePath)
280+
switch err.(type) {
281+
case git.ErrNotExist:
282+
// correct, continue
283+
default:
284+
t.Fatalf("expected git.ErrNotExist, got:%v", err)
285+
}
280286
toEntry, err := commit.GetTreeEntryByPath(opts.TreePath)
287+
assert.Nil(t, err)
281288
assert.Nil(t, fromEntry) // Should no longer exist here
282289
assert.NotNil(t, toEntry) // Should exist here
283290
// assert SHA has remained the same but paths use the new file name

0 commit comments

Comments
 (0)