OSS parts of #1903: we'd disabled these tests on enterprise temporarily, but now we're ready to make them run there again. (#11729)

Vault cares about the VAULT_LICENSE env var, but we don't want to set that in CI because it would change behaviour of tests that don't intend for it to be set.  Instead, we use VAULT_LICENSE_CI so that only packages/tests that opt-in will use it.
This commit is contained in:
Nick Cabatoff 2021-05-31 18:08:10 +02:00 committed by GitHub
parent 3e79e8252a
commit 56c0a67a53
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 1 deletions

View File

@ -1,4 +1,4 @@
// +build !race,!hsm,!enterprise
// +build !race,!hsm
// NOTE: we can't use this with HSM. We can't set testing mode on and it's not
// safe to use env vars since that provides an attack vector in the real world.
@ -23,6 +23,12 @@ import (
"github.com/mitchellh/cli"
)
func init() {
if signed := os.Getenv("VAULT_LICENSE_CI"); signed != "" {
os.Setenv("VAULT_LICENSE", signed)
}
}
func testBaseHCL(tb testing.TB, listenerExtras string) string {
tb.Helper()