mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 03:27:54 +00:00
Fix broken server config test (#7153)
This commit is contained in:
@@ -6,16 +6,12 @@ import (
|
||||
"testing"
|
||||
"time"
|
||||
|
||||
log "github.com/hashicorp/go-hclog"
|
||||
"github.com/hashicorp/hcl"
|
||||
"github.com/hashicorp/hcl/hcl/ast"
|
||||
"github.com/hashicorp/vault/sdk/helper/logging"
|
||||
)
|
||||
|
||||
func TestLoadConfigFile(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(log.Debug)
|
||||
|
||||
config, err := LoadConfigFile("./test-fixtures/config.hcl", logger)
|
||||
config, err := LoadConfigFile("./test-fixtures/config.hcl")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
@@ -85,9 +81,7 @@ func TestLoadConfigFile(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadConfigFile_topLevel(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(log.Debug)
|
||||
|
||||
config, err := LoadConfigFile("./test-fixtures/config2.hcl", logger)
|
||||
config, err := LoadConfigFile("./test-fixtures/config2.hcl")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
@@ -161,9 +155,7 @@ func TestLoadConfigFile_topLevel(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadConfigFile_json(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(log.Debug)
|
||||
|
||||
config, err := LoadConfigFile("./test-fixtures/config.hcl.json", logger)
|
||||
config, err := LoadConfigFile("./test-fixtures/config.hcl.json")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
@@ -229,9 +221,7 @@ func TestLoadConfigFile_json(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadConfigFile_json2(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(log.Debug)
|
||||
|
||||
config, err := LoadConfigFile("./test-fixtures/config2.hcl.json", logger)
|
||||
config, err := LoadConfigFile("./test-fixtures/config2.hcl.json")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
@@ -301,9 +291,7 @@ func TestLoadConfigFile_json2(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestLoadConfigDir(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(log.Debug)
|
||||
|
||||
config, err := LoadConfigDir("./test-fixtures/config-dir", logger)
|
||||
config, err := LoadConfigDir("./test-fixtures/config-dir")
|
||||
if err != nil {
|
||||
t.Fatalf("err: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user