diff options
author | Chris <ccbrown112@gmail.com> | 2018-01-05 16:17:57 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 16:17:57 -0600 |
commit | 591ef9f352efd98a85e6d04c0c9072c4c2987527 (patch) | |
tree | 2768aed148df1fba4a3e6d9c43057cf64199d6a1 /app/diagnostics_test.go | |
parent | fd3fa8f8dcfa5de42a16db9b62e1d6628f43b0fd (diff) | |
download | chat-591ef9f352efd98a85e6d04c0c9072c4c2987527.tar.gz chat-591ef9f352efd98a85e6d04c0c9072c4c2987527.tar.bz2 chat-591ef9f352efd98a85e6d04c0c9072c4c2987527.zip |
Remove utils.ClientCfg and utils.ClientCfgHash (#8041)
* remove utils.ClientCfg and utils.ClientCfgHash
* remove unused import
Diffstat (limited to 'app/diagnostics_test.go')
-rw-r--r-- | app/diagnostics_test.go | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/app/diagnostics_test.go b/app/diagnostics_test.go index 0d1c7acd8..0869e4df4 100644 --- a/app/diagnostics_test.go +++ b/app/diagnostics_test.go @@ -15,7 +15,6 @@ import ( "github.com/stretchr/testify/assert" "github.com/mattermost/mattermost-server/model" - "github.com/mattermost/mattermost-server/utils" ) func newTestServer() (chan string, *httptest.Server) { @@ -68,18 +67,15 @@ func TestDiagnostics(t *testing.T) { data, server := newTestServer() defer server.Close() - oldId := utils.CfgDiagnosticId - utils.CfgDiagnosticId = "i am not real" - defer func() { - utils.CfgDiagnosticId = oldId - }() - initDiagnostics(server.URL) + diagnosticId := "i am not real" + th.App.SetDiagnosticId(diagnosticId) + th.App.initDiagnostics(server.URL) // Should send a client identify message select { case identifyMessage := <-data: t.Log("Got idmessage:\n" + identifyMessage) - if !strings.Contains(identifyMessage, utils.CfgDiagnosticId) { + if !strings.Contains(identifyMessage, diagnosticId) { t.Fail() } case <-time.After(time.Second * 1): @@ -88,7 +84,7 @@ func TestDiagnostics(t *testing.T) { t.Run("Send", func(t *testing.T) { const TEST_VALUE = "stuff548959847" - SendDiagnostic("Testing Diagnostic", map[string]interface{}{ + th.App.SendDiagnostic("Testing Diagnostic", map[string]interface{}{ "hey": TEST_VALUE, }) select { |