File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -43,8 +43,8 @@ func fatalTestError(fmtStr string, args ...interface{}) {
43
43
type TestOptions struct {
44
44
GiteaRootPath string
45
45
FixtureFiles []string
46
- TearUp func () error
47
- TearDown func () error
46
+ SetUp func () error // SetUp will be executed before all tests in this package
47
+ TearDown func () error // TearDown will be executed after all tests in this package
48
48
}
49
49
50
50
// MainTest a reusable TestMain(..) function for unit tests that need to use a
@@ -137,9 +137,9 @@ func MainTest(m *testing.M, testOpts *TestOptions) {
137
137
}
138
138
}
139
139
140
- if testOpts .TearUp != nil {
141
- if err := testOpts .TearUp (); err != nil {
142
- fatalTestError ("tear up failed: %v\n " , err )
140
+ if testOpts .SetUp != nil {
141
+ if err := testOpts .SetUp (); err != nil {
142
+ fatalTestError ("set up failed: %v\n " , err )
143
143
}
144
144
}
145
145
You can’t perform that action at this time.
0 commit comments