Fix compilation and tests failures (#4254)

This commit is contained in:
Calvin Leung Huang 2018-04-03 14:07:43 -04:00 committed by GitHub
parent d7779fd349
commit 6b840e6c1c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 8 additions and 7 deletions

View File

@ -1298,7 +1298,7 @@ func TestExpiration_renewEntry(t *testing.T) {
ExpireTime: time.Now(),
}
resp, err := exp.renewEntry(le)
resp, err := exp.renewEntry(le, 0)
if err != nil {
t.Fatalf("err: %v", err)
}
@ -1359,7 +1359,7 @@ func TestExpiration_renewAuthEntry(t *testing.T) {
ExpireTime: time.Now().Add(time.Minute),
}
resp, err := exp.renewAuthEntry(&logical.Request{}, le)
resp, err := exp.renewAuthEntry(&logical.Request{}, le, 0)
if err != nil {
t.Fatalf("err: %v", err)
}

View File

@ -36,6 +36,7 @@ func TestSystemBackend_RootPaths(t *testing.T) {
"rotate",
"config/cors",
"config/auditing/*",
"config/ui/headers/*",
"plugins/catalog/*",
"revoke-prefix/*",
"revoke-force/*",
@ -47,7 +48,7 @@ func TestSystemBackend_RootPaths(t *testing.T) {
b := testSystemBackend(t)
actual := b.SpecialPaths().Root
if !reflect.DeepEqual(actual, expected) {
t.Fatalf("bad: %#v", actual)
t.Fatalf("bad: mismatch\nexpected:\n%#v\ngot:\n%#v", expected, actual)
}
}

View File

@ -6,13 +6,13 @@ import (
"github.com/hashicorp/vault/logical"
log "github.com/hashicorp/go-hclog"
"github.com/hashicorp/vault/helper/logging"
"github.com/hashicorp/vault/physical/inmem"
log "github.com/mgutz/logxi/v1"
)
func TestConfig_Enabled(t *testing.T) {
logger := logging.NewVaultLogger(log.LevelTrace)
logger := logging.NewVaultLogger(log.Trace)
phys, err := inmem.NewTransactionalInmem(nil, logger)
if err != nil {
t.Fatal(err)
@ -31,7 +31,7 @@ func TestConfig_Enabled(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)
if err != nil {
t.Fatal(err)
@ -125,7 +125,7 @@ func TestConfig_Headers(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)
if err != nil {
t.Fatal(err)