Skip to content

Commit ea16a3e

Browse files
committed
Fix lint and test
1 parent 87e12a1 commit ea16a3e

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

modules/git/commit_info_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"time"
1010

1111
"code.gitea.io/gitea/modules/test"
12+
1213
"github.com/stretchr/testify/assert"
1314
"github.com/stretchr/testify/require"
1415
)

modules/git/pipeline/lfs_test.go

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,14 +40,12 @@ func testFindLFSFile(t *testing.T) {
4040
tm, err := time.Parse(time.RFC3339, "2022-12-21T17:56:42-05:00")
4141
require.NoError(t, err)
4242

43-
assert.Equal(t, []*LFSResult{
44-
{
45-
Name: "CONTRIBUTING.md",
46-
SHA: "73cf03db6ece34e12bf91e8853dc58f678f2f82d",
47-
Summary: "Initial commit",
48-
When: tm,
49-
BranchName: "master",
50-
FullCommitName: "master",
51-
},
52-
}, stats)
43+
assert.Len(t, stats, 1)
44+
assert.Equal(t, "CONTRIBUTING.md", stats[0].Name)
45+
assert.Equal(t, "73cf03db6ece34e12bf91e8853dc58f678f2f82d", stats[0].SHA)
46+
assert.Equal(t, "Initial commit", stats[0].Summary)
47+
assert.Equal(t, tm, stats[0].When)
48+
assert.Empty(t, stats[0].ParentHashes)
49+
assert.Equal(t, "master", stats[0].BranchName)
50+
assert.Equal(t, "master", stats[0].FullCommitName)
5351
}

modules/git/repo_branch_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import (
88
"testing"
99

1010
"code.gitea.io/gitea/modules/test"
11+
1112
"github.com/stretchr/testify/assert"
1213
"github.com/stretchr/testify/require"
1314
)

0 commit comments

Comments
 (0)