Fix compilation and tests failures (#4254)
This commit is contained in:
parent
d7779fd349
commit
6b840e6c1c
|
@ -1298,7 +1298,7 @@ func TestExpiration_renewEntry(t *testing.T) {
|
||||||
ExpireTime: time.Now(),
|
ExpireTime: time.Now(),
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := exp.renewEntry(le)
|
resp, err := exp.renewEntry(le, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("err: %v", err)
|
t.Fatalf("err: %v", err)
|
||||||
}
|
}
|
||||||
|
@ -1359,7 +1359,7 @@ func TestExpiration_renewAuthEntry(t *testing.T) {
|
||||||
ExpireTime: time.Now().Add(time.Minute),
|
ExpireTime: time.Now().Add(time.Minute),
|
||||||
}
|
}
|
||||||
|
|
||||||
resp, err := exp.renewAuthEntry(&logical.Request{}, le)
|
resp, err := exp.renewAuthEntry(&logical.Request{}, le, 0)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("err: %v", err)
|
t.Fatalf("err: %v", err)
|
||||||
}
|
}
|
||||||
|
|
|
@ -36,6 +36,7 @@ func TestSystemBackend_RootPaths(t *testing.T) {
|
||||||
"rotate",
|
"rotate",
|
||||||
"config/cors",
|
"config/cors",
|
||||||
"config/auditing/*",
|
"config/auditing/*",
|
||||||
|
"config/ui/headers/*",
|
||||||
"plugins/catalog/*",
|
"plugins/catalog/*",
|
||||||
"revoke-prefix/*",
|
"revoke-prefix/*",
|
||||||
"revoke-force/*",
|
"revoke-force/*",
|
||||||
|
@ -47,7 +48,7 @@ func TestSystemBackend_RootPaths(t *testing.T) {
|
||||||
b := testSystemBackend(t)
|
b := testSystemBackend(t)
|
||||||
actual := b.SpecialPaths().Root
|
actual := b.SpecialPaths().Root
|
||||||
if !reflect.DeepEqual(actual, expected) {
|
if !reflect.DeepEqual(actual, expected) {
|
||||||
t.Fatalf("bad: %#v", actual)
|
t.Fatalf("bad: mismatch\nexpected:\n%#v\ngot:\n%#v", expected, actual)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6,13 +6,13 @@ import (
|
||||||
|
|
||||||
"github.com/hashicorp/vault/logical"
|
"github.com/hashicorp/vault/logical"
|
||||||
|
|
||||||
|
log "github.com/hashicorp/go-hclog"
|
||||||
"github.com/hashicorp/vault/helper/logging"
|
"github.com/hashicorp/vault/helper/logging"
|
||||||
"github.com/hashicorp/vault/physical/inmem"
|
"github.com/hashicorp/vault/physical/inmem"
|
||||||
log "github.com/mgutz/logxi/v1"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestConfig_Enabled(t *testing.T) {
|
func TestConfig_Enabled(t *testing.T) {
|
||||||
logger := logging.NewVaultLogger(log.LevelTrace)
|
logger := logging.NewVaultLogger(log.Trace)
|
||||||
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -31,7 +31,7 @@ func TestConfig_Enabled(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConfig_Headers(t *testing.T) {
|
func TestConfig_Headers(t *testing.T) {
|
||||||
logger := logging.NewVaultLogger(log.LevelTrace)
|
logger := logging.NewVaultLogger(log.Trace)
|
||||||
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
@ -125,7 +125,7 @@ func TestConfig_Headers(t *testing.T) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func TestConfig_DefaultHeaders(t *testing.T) {
|
func TestConfig_DefaultHeaders(t *testing.T) {
|
||||||
logger := logging.NewVaultLogger(log.LevelTrace)
|
logger := logging.NewVaultLogger(log.Trace)
|
||||||
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
phys, err := inmem.NewTransactionalInmem(nil, logger)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatal(err)
|
t.Fatal(err)
|
||||||
|
|
Loading…
Reference in New Issue