From 3dfe9190b05b68497478324a776c1f80d6f5e56d Mon Sep 17 00:00:00 2001 From: Lars Lehtonen Date: Sat, 16 Nov 2019 10:21:39 -0800 Subject: integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove() (#9040) integrations: fix dropped error in lfsCommitAndPushTest() --- integrations/repofiles_update_test.go | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'integrations/repofiles_update_test.go') diff --git a/integrations/repofiles_update_test.go b/integrations/repofiles_update_test.go index 35cb5e8b0c..a7beec4955 100644 --- a/integrations/repofiles_update_test.go +++ b/integrations/repofiles_update_test.go @@ -277,7 +277,14 @@ func TestCreateOrUpdateRepoFileForUpdateWithFileMove(t *testing.T) { expectedFileResponse := getExpectedFileResponseForRepofilesUpdate(commit.ID.String(), opts.TreePath) // assert that the old file no longer exists in the last commit of the branch fromEntry, err := commit.GetTreeEntryByPath(opts.FromTreePath) + switch err.(type) { + case git.ErrNotExist: + // correct, continue + default: + t.Fatalf("expected git.ErrNotExist, got:%v", err) + } toEntry, err := commit.GetTreeEntryByPath(opts.TreePath) + assert.Nil(t, err) assert.Nil(t, fromEntry) // Should no longer exist here assert.NotNil(t, toEntry) // Should exist here // assert SHA has remained the same but paths use the new file name -- cgit v1.2.3