From 2e567bd5e7f249d81af2bd7fb6dc2a01d204c4e1 Mon Sep 17 00:00:00 2001 From: Jeff Mitchell Date: Tue, 9 May 2017 08:36:20 -0400 Subject: [PATCH] Only run cassandra tests on Travis for right now --- builtin/logical/cassandra/backend_test.go | 6 ++++++ plugins/database/cassandra/cassandra_test.go | 12 ++++++++++++ 2 files changed, 18 insertions(+) diff --git a/builtin/logical/cassandra/backend_test.go b/builtin/logical/cassandra/backend_test.go index b84ce0d5a5..cfeb329b81 100644 --- a/builtin/logical/cassandra/backend_test.go +++ b/builtin/logical/cassandra/backend_test.go @@ -74,6 +74,9 @@ func cleanupTestContainer(t *testing.T, cid dockertest.ContainerID) { } func TestBackend_basic(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } config := logical.TestBackendConfig() config.StorageView = &logical.InmemStorage{} b, err := Factory(config) @@ -97,6 +100,9 @@ func TestBackend_basic(t *testing.T) { } func TestBackend_roleCrud(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } config := logical.TestBackendConfig() config.StorageView = &logical.InmemStorage{} b, err := Factory(config) diff --git a/plugins/database/cassandra/cassandra_test.go b/plugins/database/cassandra/cassandra_test.go index 9e98ec48f5..5bc75af735 100644 --- a/plugins/database/cassandra/cassandra_test.go +++ b/plugins/database/cassandra/cassandra_test.go @@ -70,6 +70,9 @@ func prepareCassandraTestContainer(t *testing.T) (cleanup func(), retURL string) } func TestCassandra_Initialize(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } cleanup, connURL := prepareCassandraTestContainer(t) defer cleanup() @@ -100,6 +103,9 @@ func TestCassandra_Initialize(t *testing.T) { } func TestCassandra_CreateUser(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } cleanup, connURL := prepareCassandraTestContainer(t) defer cleanup() @@ -132,6 +138,9 @@ func TestCassandra_CreateUser(t *testing.T) { } func TestMyCassandra_RenewUser(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } cleanup, connURL := prepareCassandraTestContainer(t) defer cleanup() @@ -169,6 +178,9 @@ func TestMyCassandra_RenewUser(t *testing.T) { } func TestCassandra_RevokeUser(t *testing.T) { + if os.Getenv("TRAVIS") != "true" { + t.SkipNow() + } cleanup, connURL := prepareCassandraTestContainer(t) defer cleanup()