aboutsummaryrefslogtreecommitdiffstats
path: root/integrations
diff options
context:
space:
mode:
authorLars Lehtonen <lars.lehtonen@gmail.com>2019-11-16 10:21:39 -0800
committerzeripath <art27@cantab.net>2019-11-16 18:21:39 +0000
commit3dfe9190b05b68497478324a776c1f80d6f5e56d (patch)
treebbc1e2bcced751740d3d66b7499a08888e69b6ea /integrations
parentf4bdcd6e2b28763919671c2c87fe68fd9bf43373 (diff)
downloadgitea-3dfe9190b05b68497478324a776c1f80d6f5e56d.tar.gz
gitea-3dfe9190b05b68497478324a776c1f80d6f5e56d.zip
integrations: fix dropped errors in TestCreateOrUpdateRepoFileForUpdateWithFileMove() (#9040)
integrations: fix dropped error in lfsCommitAndPushTest()
Diffstat (limited to 'integrations')
-rw-r--r--integrations/git_test.go1
-rw-r--r--integrations/repofiles_update_test.go7
2 files changed, 8 insertions, 0 deletions
diff --git a/integrations/git_test.go b/integrations/git_test.go
index dbcc265227..c0e1d7d284 100644
--- a/integrations/git_test.go
+++ b/integrations/git_test.go
@@ -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)
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