diff options
author | Joram Wilander <jwawilander@gmail.com> | 2017-04-03 13:32:58 -0400 |
---|---|---|
committer | Corey Hulen <corey@hulen.com> | 2017-04-03 10:32:58 -0700 |
commit | 6b61834ab14e9a4e51c29dd2904a1332c327aae6 (patch) | |
tree | 283122751e3e8c13cc058c4c575fd0e6d7a7549e /Makefile | |
parent | e49f5928c55ba57c39efa11c568c66342b962aae (diff) | |
download | chat-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 'Makefile')
-rw-r--r-- | Makefile | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -206,6 +206,22 @@ test-te: start-docker prepare-enterprise fi; \ done +test-postgres: start-docker prepare-enterprise + @echo Testing Postgres + + @sed -i'' -e 's|"DriverName": "mysql"|"DriverName": "postgres"|g' config/config.json + @sed -i'' -e 's|"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"|"DataSource": "postgres://mmuser:mostest@dockerhost:5432?sslmode=disable"|g' config/config.json + + $(GO) test $(GOFLAGS) -run=$(TESTS) -test.v -test.timeout=2000s -covermode=count -coverprofile=cprofile.out -coverpkg=$(ALL_PACKAGES_COMMA) github.com/mattermost/platform/store || exit 1; \ + if [ -f cprofile.out ]; then \ + tail -n +2 cprofile.out >> cover.out; \ + rm cprofile.out; \ + fi; \ + + @sed -i'' -e 's|"DataSource": "postgres://mmuser:mostest@dockerhost:5432?sslmode=disable"|"DataSource": "mmuser:mostest@tcp(dockerhost:3306)/mattermost_test?charset=utf8mb4,utf8"|g' config/config.json + @sed -i'' -e 's|"DriverName": "postgres"|"DriverName": "mysql"|g' config/config.json + @rm config/config.json-e + test-ee: start-docker prepare-enterprise @echo Testing EE |