Skip to content
This repository has been archived by the owner on Feb 24, 2024. It is now read-only.

Commit

Permalink
resetting ParameterFilterList before integration test
Browse files Browse the repository at this point in the history
  • Loading branch information
paganotoni committed Aug 2, 2018
1 parent 46ee198 commit 1e01c8a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions middleware/param_logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package middleware

import (
"encoding/json"
"fmt"
"mime/multipart"
"net/url"
"strings"
Expand Down Expand Up @@ -143,5 +144,8 @@ func (pl parameterLogger) maskSecrets(form url.Values) url.Values {
}
}

fmt.Println(copy)
fmt.Println(pl.blacklist)

return copy
}
8 changes: 4 additions & 4 deletions middleware/param_logger_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ func Test_maskSecrets(t *testing.T) {

func Test_maskSecretsCustom(t *testing.T) {
r := require.New(t)
ParameterFilterBlackList = []string{
"FirstName", "LastName", "MiddleName",
pl := parameterLogger{
blacklist: []string{
"FirstName", "LastName", "MiddleName",
},
}

pl := parameterLogger{}

filteredForm := pl.maskSecrets(url.Values{
"FirstName": []string{"Antonio"},
"MiddleName": []string{"José"},
Expand Down

0 comments on commit 1e01c8a

Please sign in to comment.