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

travis: force use of MySQL in integration tests #108

Merged
merged 1 commit into from
Nov 9, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ install:

script:
- set -e
- export TRILLIAN_SQL_DRIVER=mysql
- cd $HOME/gopath/src/github.com/google/certificate-transparency-go
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then export PRESUBMIT_OPTS=--no-linters; fi
- ./scripts/presubmit.sh ${PRESUBMIT_OPTS}
Expand Down
5 changes: 5 additions & 0 deletions trillian/integration/ct_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ import (
"github.com/google/certificate-transparency-go/trillian/ctfe"
"github.com/google/certificate-transparency-go/trillian/ctfe/configpb"
"github.com/google/trillian/crypto/keyspb"
"github.com/google/trillian/storage/testdb"

// Register PEMKeyFile and PrivateKey ProtoHandlers
_ "github.com/google/trillian/crypto/keys/der/proto"
Expand Down Expand Up @@ -83,6 +84,10 @@ const (
)

func TestInProcessCTIntegration(t *testing.T) {
if provider := testdb.Default(); !provider.IsMySQL() {
t.Skipf("Skipping CT integration test, SQL driver is %q", provider.Driver)
}

pubKeyDER, err := loadPublicKey(pubKeyPEMFile)
if err != nil {
t.Fatalf("Could not load public key: %v", err)
Expand Down