Skip to content

Commit 7a3090d

Browse files
author
John Skopis
committed
Update regex in main_test for golang >= 1.10
1 parent 482a79d commit 7a3090d

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
language: go
22

33
go:
4-
- 1.7.x
5-
- 1.8.x
4+
- 1.11.x
65
- master
76

87
matrix:

main_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func TestUserAgentSetWhenPostingToElasticsearch(t *testing.T) {
9494
w, r := recordedRequest(t, s.URL+"/webhook")
9595
handler(w, r)
9696

97-
expected := regexp.MustCompile(`^alertmanager2es .*? \(go\d.\d(?:.\d)?\)$`)
97+
expected := regexp.MustCompile(`^alertmanager2es .*? \(go\d.\d+(?:.\d+)?\)$`)
9898
if !expected.MatchString(userAgent) {
9999
t.Fatalf("expected user agent to match %s, got %q", expected.String(), userAgent)
100100
}

0 commit comments

Comments
 (0)