Skip to content

Commit

Permalink
integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpda…
Browse files Browse the repository at this point in the history
…teWithFileMove() (#9040)

integrations: fix dropped error in lfsCommitAndPushTest()
  • Loading branch information
alrs authored and zeripath committed Nov 16, 2019
1 parent f4bdcd6 commit 3dfe919
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions integrations/git_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ func lfsCommitAndPushTest(t *testing.T, dstPath string) (littleLFS, bigLFS strin
},
Message: fmt.Sprintf("Testing commit @ %v", time.Now()),
})
assert.NoError(t, err)
git.GlobalCommandArgs = oldGlobals

littleLFS, bigLFS = commitAndPushTest(t, dstPath, prefix)
Expand Down
7 changes: 7 additions & 0 deletions integrations/repofiles_update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3dfe919

Please sign in to comment.