Skip to content

Commit

Permalink
helper/logging: Adjust unit test regex flag (#1224)
Browse files Browse the repository at this point in the history
* add flag

* add timeout to lint
  • Loading branch information
austinvalle authored Jul 13, 2023
1 parent aa0b6ac commit 60e8641
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,7 @@ linters:
- unparam
- unused
- vet

run:
# Prevent false positive timeouts in CI
timeout: 5m
2 changes: 1 addition & 1 deletion helper/logging/logging_http_transport_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ func TestNewSubsystemLoggingHTTPTransport(t *testing.T) {
func TestNewLoggingHTTPTransport_LogMasking(t *testing.T) {
ctx, loggerOutput := setupRootLogger()
ctx = tflog.MaskFieldValuesWithFieldKeys(ctx, "tf_http_op_type")
ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`<html>.*</html>`))
ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`(?s)<html>.*</html>`))
ctx = tflog.MaskMessageStrings(ctx, "Request", "Response")

transport := logging.NewLoggingHTTPTransport(http.DefaultTransport)
Expand Down

0 comments on commit 60e8641

Please sign in to comment.