add stop server to API 4 tests (#6638)
Этот коммит содержится в:
коммит произвёл
Corey Hulen
родитель
1138dd6770
Коммит
5b017171cd
@@ -105,6 +105,12 @@ func Setup() *TestHelper {
|
||||
return th
|
||||
}
|
||||
|
||||
func StopServer() {
|
||||
if app.Srv != nil {
|
||||
app.StopServer()
|
||||
}
|
||||
}
|
||||
|
||||
func TearDown() {
|
||||
utils.DisableDebugLogForTest()
|
||||
|
||||
|
||||
@@ -71,3 +71,12 @@ func TestWebSocket(t *testing.T) {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func TestZZWebSocketTearDown(t *testing.T) {
|
||||
// *IMPORTANT* - Kind of hacky
|
||||
// This should be the last function in any test file
|
||||
// that calls Setup()
|
||||
// Should be in the last file too sorted by name
|
||||
time.Sleep(2 * time.Second)
|
||||
StopServer()
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user