summaryrefslogtreecommitdiffstats
path: root/store/redis_test.go
diff options
context:
space:
mode:
author=Corey Hulen <corey@hulen.com>2015-07-14 15:12:04 -0800
committer=Corey Hulen <corey@hulen.com>2015-07-14 15:12:04 -0800
commit246d12aaf23fa3a2c23225b33a333effff76253b (patch)
treec2a19c301b34391427e60e0e5cfcbf9879a44ee7 /store/redis_test.go
parenta45dea6b06bb62b3fb953d598854c371f417082d (diff)
downloadchat-246d12aaf23fa3a2c23225b33a333effff76253b.tar.gz
chat-246d12aaf23fa3a2c23225b33a333effff76253b.tar.bz2
chat-246d12aaf23fa3a2c23225b33a333effff76253b.zip
fixes mm-1348 removing dependency on redis
Diffstat (limited to 'store/redis_test.go')
-rw-r--r--store/redis_test.go59
1 files changed, 0 insertions, 59 deletions
diff --git a/store/redis_test.go b/store/redis_test.go
deleted file mode 100644
index 11bd9ca6a..000000000
--- a/store/redis_test.go
+++ /dev/null
@@ -1,59 +0,0 @@
-// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved.
-// See License.txt for license information.
-
-package store
-
-import (
- "fmt"
- "github.com/mattermost/platform/model"
- "github.com/mattermost/platform/utils"
- "testing"
-)
-
-func TestRedis(t *testing.T) {
- utils.LoadConfig("config.json")
-
- c := RedisClient()
-
- if c == nil {
- t.Fatal("should have a valid redis connection")
- }
-
- pubsub := c.PubSub()
- defer pubsub.Close()
-
- m := model.NewMessage(model.NewId(), model.NewId(), model.NewId(), model.ACTION_TYPING)
- m.Add("RootId", model.NewId())
-
- err := pubsub.Subscribe(m.TeamId)
- if err != nil {
- t.Fatal(err)
- }
-
- // should be the subscribe success message
- // lets gobble that up
- if _, err := pubsub.Receive(); err != nil {
- t.Fatal(err)
- }
-
- PublishAndForget(m)
-
- fmt.Println("here1")
-
- if msg, err := pubsub.Receive(); err != nil {
- t.Fatal(err)
- } else {
-
- rmsg := GetMessageFromPayload(msg)
-
- if m.TeamId != rmsg.TeamId {
- t.Fatal("Ids do not match")
- }
-
- if m.Props["RootId"] != rmsg.Props["RootId"] {
- t.Fatal("Ids do not match")
- }
- }
-
- RedisClose()
-}