mirror of
https://github.com/mattermost/mattermost.git
synced 2026-09-24 16:05:00 +08:00
add stop server to API 4 tests (#6638)
This commit is contained in:
committed by
Corey Hulen
parent
1138dd6770
commit
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()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user