vault/command/server/config_test.go
Josh Black f0c8b4c7a9
Fix JSON encoding adding newlines. (#8928)
Fix JSON encoding adding newlines.

This manifested itself when encoding config values, which all map to
strings. An extra new line would get added by json.Encode, which caused
other things to break with confusing error messagges. Switching to
json.Marshal seems to solve the problem.
2020-05-19 16:13:05 -07:00

52 lines
951 B
Go

// +build !enterprise
package server
import (
"testing"
)
func TestLoadConfigFile(t *testing.T) {
testLoadConfigFile(t)
}
func TestLoadConfigFile_topLevel(t *testing.T) {
testLoadConfigFile_topLevel(t, nil)
}
func TestLoadConfigFile_json(t *testing.T) {
testLoadConfigFile_json(t)
}
func TestLoadConfigFile_json2(t *testing.T) {
testLoadConfigFile_json2(t, nil)
}
func TestLoadConfigFileIntegerAndBooleanValues(t *testing.T) {
testLoadConfigFileIntegerAndBooleanValues(t)
}
func TestLoadConfigFileIntegerAndBooleanValuesJson(t *testing.T) {
testLoadConfigFileIntegerAndBooleanValuesJson(t)
}
func TestLoadConfigDir(t *testing.T) {
testLoadConfigDir(t)
}
func TestConfig_Sanitized(t *testing.T) {
testConfig_Sanitized(t)
}
func TestParseListeners(t *testing.T) {
testParseListeners(t)
}
func TestParseEntropy(t *testing.T) {
testParseEntropy(t, true)
}
func TestConfigRaftRetryJoin(t *testing.T) {
testConfigRaftRetryJoin(t)
}