Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Bajao <ebajao@gitlab.com>2019-02-28 12:25:50 +0300
committerPatrick Bajao <ebajao@gitlab.com>2019-03-01 03:46:50 +0300
commit2d18b28e864391d453fdf8694ba1640fcdadc9bc (patch)
treefd10fe3e08951b1b2fe7d266c72a61ce97870e55
parent97a7c7f9877f29c2cd89864cbaa6e4c2f5714093 (diff)
Add an assertion to test
This checks whether the new commit created is now the latest commit of the target branch.
-rw-r--r--internal/service/operations/commit_files_test.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/internal/service/operations/commit_files_test.go b/internal/service/operations/commit_files_test.go
index 7c9a32de6..402cef513 100644
--- a/internal/service/operations/commit_files_test.go
+++ b/internal/service/operations/commit_files_test.go
@@ -242,9 +242,10 @@ func TestSuccessfulUserCommitFilesRequestForceCommit(t *testing.T) {
require.NoError(t, err)
update := r.GetBranchUpdate()
- newCommit, err := log.GetCommit(ctxOuter, testRepo, update.CommitId)
+ targetBranchCommit, err = log.GetCommit(ctxOuter, testRepo, targetBranchName)
require.NoError(t, err)
- require.Equal(t, newCommit.ParentIds, []string{startBranchCommit.Id})
+ require.Equal(t, targetBranchCommit.Id, update.CommitId)
+ require.Equal(t, targetBranchCommit.ParentIds, []string{startBranchCommit.Id})
}
func TestFailedUserCommitFilesRequestDueToHooks(t *testing.T) {