Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small sql maintenance #704

Merged
merged 2 commits into from
Nov 15, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Testing: Make MySQL DB creating more error resilient
  • Loading branch information
nils-werner committed Nov 15, 2014
commit 331af081282aeaf3699ac4d278960694cee1dfe2
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ test:
go test -cover -short ./...

test_mysql:
mysql -P 3306 --protocol=tcp -u root -e 'create database test;'
mysql -P 3306 --protocol=tcp -u root -e 'create database if not exists test;'
TEST_DRIVER="mysql" TEST_DATASOURCE="root@tcp(127.0.0.1:3306)/test" go test -short github.com/drone/drone/server/datastore/database
mysql -P 3306 --protocol=tcp -u root -e 'drop database test;'

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
Expand All @@ -26,8 +27,8 @@ build:
go build -o packaging/root/usr/local/bin/droned -ldflags "-X main.revision $(SHA)" github.com/drone/drone/server

install:
install -t /usr/local/bin packaging/root/usr/local/bin/drone
install -t /usr/local/bin packaging/root/usr/local/bin/droned
install -t /usr/local/bin packaging/root/usr/local/bin/drone
install -t /usr/local/bin packaging/root/usr/local/bin/droned

run:
@go run server/main.go --config=$$HOME/.drone/config.toml
Expand Down