mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
Skip acceptance tests if VAULT_ACC is not set
This commit is contained in:
@@ -19,7 +19,8 @@ import (
|
||||
)
|
||||
|
||||
func TestBackend_basic(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -40,7 +41,8 @@ func TestBackend_basic(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBackend_management(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -61,7 +63,8 @@ func TestBackend_management(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBackend_crud(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -82,7 +85,8 @@ func TestBackend_crud(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBackend_role_lease(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +36,8 @@ var (
|
||||
// Performs basic tests on CA functionality
|
||||
// Uses the RSA CA key
|
||||
func TestBackend_RSAKey(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -71,7 +72,8 @@ func TestBackend_RSAKey(t *testing.T) {
|
||||
// Performs basic tests on CA functionality
|
||||
// Uses the EC CA key
|
||||
func TestBackend_ECKey(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -104,7 +106,8 @@ func TestBackend_ECKey(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBackend_CSRValues(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -137,7 +140,8 @@ func TestBackend_CSRValues(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestBackend_URLsCRUD(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -173,7 +177,8 @@ func TestBackend_URLsCRUD(t *testing.T) {
|
||||
// of role flags to ensure that they are properly restricted
|
||||
// Uses the RSA CA key
|
||||
func TestBackend_RSARoles(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -220,7 +225,8 @@ func TestBackend_RSARoles(t *testing.T) {
|
||||
// of role flags to ensure that they are properly restricted
|
||||
// Uses the RSA CA key
|
||||
func TestBackend_RSARoles_CSR(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -267,7 +273,8 @@ func TestBackend_RSARoles_CSR(t *testing.T) {
|
||||
// of role flags to ensure that they are properly restricted
|
||||
// Uses the EC CA key
|
||||
func TestBackend_ECRoles(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
@@ -314,7 +321,8 @@ func TestBackend_ECRoles(t *testing.T) {
|
||||
// of role flags to ensure that they are properly restricted
|
||||
// Uses the EC CA key
|
||||
func TestBackend_ECRoles_CSR(t *testing.T) {
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -554,7 +554,8 @@ func TestKeyUpgrade(t *testing.T) {
|
||||
|
||||
func TestPolicyFuzzing(t *testing.T) {
|
||||
// Don't run if not during acceptance tests
|
||||
if os.Getenv("VAULT_ACC") == "" {
|
||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user