Skip to content

Commit 60e8641

Browse files
authored
helper/logging: Adjust unit test regex flag (#1224)
* add flag * add timeout to lint
1 parent aa0b6ac commit 60e8641

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

.golangci.yml

+4
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ linters:
2525
- unparam
2626
- unused
2727
- vet
28+
29+
run:
30+
# Prevent false positive timeouts in CI
31+
timeout: 5m

helper/logging/logging_http_transport_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ func TestNewSubsystemLoggingHTTPTransport(t *testing.T) {
201201
func TestNewLoggingHTTPTransport_LogMasking(t *testing.T) {
202202
ctx, loggerOutput := setupRootLogger()
203203
ctx = tflog.MaskFieldValuesWithFieldKeys(ctx, "tf_http_op_type")
204-
ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`<html>.*</html>`))
204+
ctx = tflog.MaskAllFieldValuesRegexes(ctx, regexp.MustCompile(`(?s)<html>.*</html>`))
205205
ctx = tflog.MaskMessageStrings(ctx, "Request", "Response")
206206

207207
transport := logging.NewLoggingHTTPTransport(http.DefaultTransport)

0 commit comments

Comments
 (0)