added unit tests for postgres and mysql

This commit is contained in:
Brad Rydzewski
2014-09-30 23:30:42 -07:00
parent 892703b3f2
commit 6b721f5b98
4 changed files with 15 additions and 3 deletions

View File

@@ -12,6 +12,13 @@ test:
go vet ./...
go test -cover -short ./...
test_mysql:
mysql -P 3306 --protocol=tcp -u root -e 'create database test;'
TEST_DRIVER="mysql" TEST_DATASOURCE="root@tcp(127.0.0.1:3306)/test" go test -short github.com/drone/drone/server/datastore/database
test_postgres:
TEST_DRIVER="postgres" TEST_DATASOURCE="host=127.0.0.1 user=postgres dbname=postgres sslmode=disable" go test -short github.com/drone/drone/server/datastore/database
build:
go build -o debian/drone/usr/local/bin/drone -ldflags "-X main.revision $(SHA)" github.com/drone/drone/cli
go build -o debian/drone/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server