mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-09 01:39:39 +08:00
change: relocate tests
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
package httpboomer
|
||||
|
||||
import (
|
||||
"os"
|
||||
"testing"
|
||||
)
|
||||
|
||||
@@ -38,22 +37,3 @@ func TestHttpRunner(t *testing.T) {
|
||||
t.Fatalf("run testcase error: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestMain(m *testing.M) {
|
||||
// setup, prepare demo json testcase file path
|
||||
jsonPath := demoTestCaseJSONPath
|
||||
err := demoTestCase.dump2JSON(jsonPath)
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
// run all tests
|
||||
code := m.Run()
|
||||
defer os.Exit(code)
|
||||
|
||||
// teardown
|
||||
err = os.Remove(jsonPath)
|
||||
if err != nil {
|
||||
os.Exit(1)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user