mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
unexport as much as possible in the audit package (#28039)
This commit is contained in:
@@ -25,7 +25,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
}{
|
||||
"happy-path-json": {
|
||||
config: map[string]string{
|
||||
"format": JSONFormat.String(),
|
||||
"format": jsonFormat.String(),
|
||||
"hmac_accessor": "true",
|
||||
"log_raw": "true",
|
||||
"elide_list_responses": "true",
|
||||
@@ -39,7 +39,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
},
|
||||
"happy-path-jsonx": {
|
||||
config: map[string]string{
|
||||
"format": JSONxFormat.String(),
|
||||
"format": jsonxFormat.String(),
|
||||
"hmac_accessor": "true",
|
||||
"log_raw": "true",
|
||||
"elide_list_responses": "true",
|
||||
@@ -65,7 +65,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
},
|
||||
"invalid-hmac-accessor": {
|
||||
config: map[string]string{
|
||||
"format": JSONFormat.String(),
|
||||
"format": jsonFormat.String(),
|
||||
"hmac_accessor": "maybe",
|
||||
},
|
||||
want: formatterConfig{},
|
||||
@@ -74,7 +74,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
},
|
||||
"invalid-log-raw": {
|
||||
config: map[string]string{
|
||||
"format": JSONFormat.String(),
|
||||
"format": jsonFormat.String(),
|
||||
"hmac_accessor": "true",
|
||||
"log_raw": "maybe",
|
||||
},
|
||||
@@ -84,7 +84,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
},
|
||||
"invalid-elide-bool": {
|
||||
config: map[string]string{
|
||||
"format": JSONFormat.String(),
|
||||
"format": jsonFormat.String(),
|
||||
"hmac_accessor": "true",
|
||||
"log_raw": "true",
|
||||
"elide_list_responses": "maybe",
|
||||
@@ -95,11 +95,11 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
},
|
||||
"prefix": {
|
||||
config: map[string]string{
|
||||
"format": JSONFormat.String(),
|
||||
"format": jsonFormat.String(),
|
||||
"prefix": "foo",
|
||||
},
|
||||
want: formatterConfig{
|
||||
requiredFormat: JSONFormat,
|
||||
requiredFormat: jsonFormat,
|
||||
prefix: "foo",
|
||||
hmacAccessor: true,
|
||||
},
|
||||
@@ -111,7 +111,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
t.Run(name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
got, err := newFormatterConfig(&NoopHeaderFormatter{}, tc.config)
|
||||
got, err := newFormatterConfig(&noopHeaderFormatter{}, tc.config)
|
||||
if tc.wantErr {
|
||||
require.Error(t, err)
|
||||
require.EqualError(t, err, tc.expectedMessage)
|
||||
@@ -133,7 +133,7 @@ func TestBackend_newFormatterConfig(t *testing.T) {
|
||||
func TestBackend_configureFormatterNode(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
b, err := newBackend(&NoopHeaderFormatter{}, &BackendConfig{
|
||||
b, err := newBackend(&noopHeaderFormatter{}, &BackendConfig{
|
||||
MountPath: "foo",
|
||||
Logger: hclog.NewNullLogger(),
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user