Skip to content

Commit ecf68b6

Browse files
committed
command, server: server doesn't have to be created on every test case
Signed-off-by: bake <[email protected]>
1 parent 31fe852 commit ecf68b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd/gitbase/command/server_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,8 @@ func TestAddMatch(t *testing.T) {
1818
{"../../../_testdata/repositories-link/", require.NoError},
1919
{"../../../_testdata/repositories-not-exist/", require.Error},
2020
}
21+
c := &Server{pool: gitbase.NewRepositoryPool(0)}
2122
for _, e := range expected {
22-
c := &Server{pool: gitbase.NewRepositoryPool(0)}
2323
e.err(c.addMatch(e.path))
2424
}
2525
}

0 commit comments

Comments
 (0)