mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 03:58:01 +00:00
Always run transit acceptance tests
This commit is contained in:
@@ -4,7 +4,6 @@ import (
|
|||||||
"encoding/base64"
|
"encoding/base64"
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
"os"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
@@ -24,8 +23,7 @@ const (
|
|||||||
func TestBackend_basic(t *testing.T) {
|
func TestBackend_basic(t *testing.T) {
|
||||||
decryptData := make(map[string]interface{})
|
decryptData := make(map[string]interface{})
|
||||||
logicaltest.Test(t, logicaltest.TestCase{
|
logicaltest.Test(t, logicaltest.TestCase{
|
||||||
AcceptanceTest: true,
|
Factory: Factory,
|
||||||
Factory: Factory,
|
|
||||||
Steps: []logicaltest.TestStep{
|
Steps: []logicaltest.TestStep{
|
||||||
testAccStepWritePolicy(t, "test", false),
|
testAccStepWritePolicy(t, "test", false),
|
||||||
testAccStepReadPolicy(t, "test", false, false),
|
testAccStepReadPolicy(t, "test", false, false),
|
||||||
@@ -48,8 +46,7 @@ func TestBackend_basic(t *testing.T) {
|
|||||||
func TestBackend_upsert(t *testing.T) {
|
func TestBackend_upsert(t *testing.T) {
|
||||||
decryptData := make(map[string]interface{})
|
decryptData := make(map[string]interface{})
|
||||||
logicaltest.Test(t, logicaltest.TestCase{
|
logicaltest.Test(t, logicaltest.TestCase{
|
||||||
AcceptanceTest: true,
|
Factory: Factory,
|
||||||
Factory: Factory,
|
|
||||||
Steps: []logicaltest.TestStep{
|
Steps: []logicaltest.TestStep{
|
||||||
testAccStepReadPolicy(t, "test", true, false),
|
testAccStepReadPolicy(t, "test", true, false),
|
||||||
testAccStepEncryptUpsert(t, "test", testPlaintext, decryptData),
|
testAccStepEncryptUpsert(t, "test", testPlaintext, decryptData),
|
||||||
@@ -62,8 +59,7 @@ func TestBackend_upsert(t *testing.T) {
|
|||||||
func TestBackend_datakey(t *testing.T) {
|
func TestBackend_datakey(t *testing.T) {
|
||||||
dataKeyInfo := make(map[string]interface{})
|
dataKeyInfo := make(map[string]interface{})
|
||||||
logicaltest.Test(t, logicaltest.TestCase{
|
logicaltest.Test(t, logicaltest.TestCase{
|
||||||
AcceptanceTest: true,
|
Factory: Factory,
|
||||||
Factory: Factory,
|
|
||||||
Steps: []logicaltest.TestStep{
|
Steps: []logicaltest.TestStep{
|
||||||
testAccStepWritePolicy(t, "test", false),
|
testAccStepWritePolicy(t, "test", false),
|
||||||
testAccStepReadPolicy(t, "test", false, false),
|
testAccStepReadPolicy(t, "test", false, false),
|
||||||
@@ -78,8 +74,7 @@ func TestBackend_rotation(t *testing.T) {
|
|||||||
decryptData := make(map[string]interface{})
|
decryptData := make(map[string]interface{})
|
||||||
encryptHistory := make(map[int]map[string]interface{})
|
encryptHistory := make(map[int]map[string]interface{})
|
||||||
logicaltest.Test(t, logicaltest.TestCase{
|
logicaltest.Test(t, logicaltest.TestCase{
|
||||||
AcceptanceTest: true,
|
Factory: Factory,
|
||||||
Factory: Factory,
|
|
||||||
Steps: []logicaltest.TestStep{
|
Steps: []logicaltest.TestStep{
|
||||||
testAccStepWritePolicy(t, "test", false),
|
testAccStepWritePolicy(t, "test", false),
|
||||||
testAccStepEncryptVX(t, "test", testPlaintext, decryptData, 0, encryptHistory),
|
testAccStepEncryptVX(t, "test", testPlaintext, decryptData, 0, encryptHistory),
|
||||||
@@ -136,8 +131,7 @@ func TestBackend_rotation(t *testing.T) {
|
|||||||
func TestBackend_basic_derived(t *testing.T) {
|
func TestBackend_basic_derived(t *testing.T) {
|
||||||
decryptData := make(map[string]interface{})
|
decryptData := make(map[string]interface{})
|
||||||
logicaltest.Test(t, logicaltest.TestCase{
|
logicaltest.Test(t, logicaltest.TestCase{
|
||||||
AcceptanceTest: true,
|
Factory: Factory,
|
||||||
Factory: Factory,
|
|
||||||
Steps: []logicaltest.TestStep{
|
Steps: []logicaltest.TestStep{
|
||||||
testAccStepWritePolicy(t, "test", true),
|
testAccStepWritePolicy(t, "test", true),
|
||||||
testAccStepReadPolicy(t, "test", false, true),
|
testAccStepReadPolicy(t, "test", false, true),
|
||||||
@@ -672,12 +666,6 @@ func TestConvergentEncryption(t *testing.T) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestPolicyFuzzing(t *testing.T) {
|
func TestPolicyFuzzing(t *testing.T) {
|
||||||
// Don't run if not during acceptance tests
|
|
||||||
if os.Getenv(logicaltest.TestEnvVar) == "" {
|
|
||||||
t.Skip(fmt.Sprintf("Acceptance tests skipped unless env '%s' set", logicaltest.TestEnvVar))
|
|
||||||
return
|
|
||||||
}
|
|
||||||
|
|
||||||
var be *backend
|
var be *backend
|
||||||
sysView := logical.TestSystemView()
|
sysView := logical.TestSystemView()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user