aboutsummaryrefslogtreecommitdiffstats
path: root/modules/git/repo_branch_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/git/repo_branch_test.go')
-rw-r--r--modules/git/repo_branch_test.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/modules/git/repo_branch_test.go b/modules/git/repo_branch_test.go
index 5d3b8abb3a..8e8ea16fcd 100644
--- a/modules/git/repo_branch_test.go
+++ b/modules/git/repo_branch_test.go
@@ -21,21 +21,21 @@ func TestRepository_GetBranches(t *testing.T) {
assert.NoError(t, err)
assert.Len(t, branches, 2)
- assert.EqualValues(t, 3, countAll)
+ assert.Equal(t, 3, countAll)
assert.ElementsMatch(t, []string{"master", "branch2"}, branches)
branches, countAll, err = bareRepo1.GetBranchNames(0, 0)
assert.NoError(t, err)
assert.Len(t, branches, 3)
- assert.EqualValues(t, 3, countAll)
+ assert.Equal(t, 3, countAll)
assert.ElementsMatch(t, []string{"master", "branch2", "branch1"}, branches)
branches, countAll, err = bareRepo1.GetBranchNames(5, 1)
assert.NoError(t, err)
assert.Empty(t, branches)
- assert.EqualValues(t, 3, countAll)
+ assert.Equal(t, 3, countAll)
assert.ElementsMatch(t, []string{}, branches)
}
@@ -47,7 +47,7 @@ func BenchmarkRepository_GetBranches(b *testing.B) {
}
defer bareRepo1.Close()
- for i := 0; i < b.N; i++ {
+ for b.Loop() {
_, _, err := bareRepo1.GetBranchNames(0, 0)
if err != nil {
b.Fatal(err)
@@ -71,15 +71,15 @@ func TestGetRefsBySha(t *testing.T) {
// refs/pull/1/head
branches, err = bareRepo5.GetRefsBySha("c83380d7056593c51a699d12b9c00627bd5743e9", PullPrefix)
assert.NoError(t, err)
- assert.EqualValues(t, []string{"refs/pull/1/head"}, branches)
+ assert.Equal(t, []string{"refs/pull/1/head"}, branches)
branches, err = bareRepo5.GetRefsBySha("d8e0bbb45f200e67d9a784ce55bd90821af45ebd", BranchPrefix)
assert.NoError(t, err)
- assert.EqualValues(t, []string{"refs/heads/master", "refs/heads/master-clone"}, branches)
+ assert.Equal(t, []string{"refs/heads/master", "refs/heads/master-clone"}, branches)
branches, err = bareRepo5.GetRefsBySha("58a4bcc53ac13e7ff76127e0fb518b5262bf09af", BranchPrefix)
assert.NoError(t, err)
- assert.EqualValues(t, []string{"refs/heads/test-patch-1"}, branches)
+ assert.Equal(t, []string{"refs/heads/test-patch-1"}, branches)
}
func BenchmarkGetRefsBySha(b *testing.B) {