summaryrefslogtreecommitdiffstats
path: root/store/sql_store_test.go
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2017-04-03 13:32:58 -0400
committerCorey Hulen <corey@hulen.com>2017-04-03 10:32:58 -0700
commit6b61834ab14e9a4e51c29dd2904a1332c327aae6 (patch)
tree283122751e3e8c13cc058c4c575fd0e6d7a7549e /store/sql_store_test.go
parente49f5928c55ba57c39efa11c568c66342b962aae (diff)
downloadchat-6b61834ab14e9a4e51c29dd2904a1332c327aae6.tar.gz
chat-6b61834ab14e9a4e51c29dd2904a1332c327aae6.tar.bz2
chat-6b61834ab14e9a4e51c29dd2904a1332c327aae6.zip
Add store unit tests and add make target for testing store with postgres (#5925)
* Add store unit tests and add make target for testing store with postgres * Remove postgres target form test-server target * Fix audit test
Diffstat (limited to 'store/sql_store_test.go')
-rw-r--r--store/sql_store_test.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/store/sql_store_test.go b/store/sql_store_test.go
index 3c6081e3c..303cfc18e 100644
--- a/store/sql_store_test.go
+++ b/store/sql_store_test.go
@@ -25,12 +25,20 @@ func Setup() {
}
func TestSqlStore1(t *testing.T) {
+ utils.TranslationsPreInit()
utils.LoadConfig("config.json")
utils.Cfg.SqlSettings.Trace = true
store := NewSqlStore()
store.Close()
+ utils.Cfg.SqlSettings.DataSourceReplicas = []string{utils.Cfg.SqlSettings.DataSource}
+
+ store = NewSqlStore()
+ store.TotalMasterDbConnections()
+ store.TotalReadDbConnections()
+ store.Close()
+
utils.LoadConfig("config.json")
}