Only run cassandra test with VAULT_ACC set

This commit is contained in:
Chris Hoffman 2018-10-19 11:35:21 -04:00 committed by GitHub
parent a920662d03
commit 646fe183bf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,7 +73,7 @@ func prepareCassandraTestContainer(t *testing.T) (func(), string, int) {
}
func TestCassandra_Initialize(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
if os.Getenv("VAULT_ACC") == "" {
t.SkipNow()
}
cleanup, address, port := prepareCassandraTestContainer(t)
@ -118,7 +118,7 @@ func TestCassandra_Initialize(t *testing.T) {
}
func TestCassandra_CreateUser(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
if os.Getenv("VAULT_ACC") == "" {
t.SkipNow()
}
cleanup, address, port := prepareCassandraTestContainer(t)
@ -158,7 +158,7 @@ func TestCassandra_CreateUser(t *testing.T) {
}
func TestMyCassandra_RenewUser(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
if os.Getenv("VAULT_ACC") == "" {
t.SkipNow()
}
cleanup, address, port := prepareCassandraTestContainer(t)
@ -203,7 +203,7 @@ func TestMyCassandra_RenewUser(t *testing.T) {
}
func TestCassandra_RevokeUser(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
if os.Getenv("VAULT_ACC") == "" {
t.SkipNow()
}
cleanup, address, port := prepareCassandraTestContainer(t)
@ -253,7 +253,7 @@ func TestCassandra_RevokeUser(t *testing.T) {
}
func TestCassandra_RotateRootCredentials(t *testing.T) {
if os.Getenv("TRAVIS") != "true" {
if os.Getenv("VAULT_ACC") == "" {
t.SkipNow()
}
cleanup, address, port := prepareCassandraTestContainer(t)