Skip to content

Commit e70f648

Browse files
skarimojirikuncar
andauthored
Fix telemetry test regex (#1366)
* fix telemetry regex * Apply code review suggestions * Apply code review suggestions Co-authored-by: Jiri Kuncar <[email protected]> Co-authored-by: Jiri Kuncar <[email protected]>
1 parent 182cc20 commit e70f648

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/api/v1/datadog/telemetry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestTelemetryHeaders(t *testing.T) {
1919
assert.NoError(err)
2020
gock.New(URL).
2121
Get("integration/aws").
22-
MatchHeader("User-Agent", "^datadog-api-client-go/\\d\\.\\d\\.\\d.*? \\(go .*?; os .*?; arch .*?\\)$").
22+
MatchHeader("User-Agent", "^datadog-api-client-go\\/\\d+\\.\\d+\\.\\d+.*? \\(go .*?; os .*?; arch .*?\\)$").
2323
Reply(299)
2424
defer gock.Off()
2525

tests/api/v2/datadog/telemetry_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func TestTelemetryHeaders(t *testing.T) {
1919
assert.NoError(err)
2020
gock.New(URL).
2121
Get("dashboard/lists/manual/1234/dashboards").
22-
MatchHeader("User-Agent", "^datadog-api-client-go/\\d\\.\\d\\.\\d.*? \\(go .*?; os .*?; arch .*?\\)$").
22+
MatchHeader("User-Agent", "^datadog-api-client-go\\/\\d+\\.\\d+\\.\\d+.*? \\(go .*?; os .*?; arch .*?\\)$").
2323
Reply(299)
2424
defer gock.Off()
2525

0 commit comments

Comments
 (0)