Skip to content

Commit

Permalink
Use Go 1.19.1
Browse files Browse the repository at this point in the history
  • Loading branch information
prymitive committed Sep 14, 2022
1 parent 79787a4 commit 85fd6d1
Show file tree
Hide file tree
Showing 11 changed files with 25 additions and 22 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Test
run: make benchmark
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Build binary
run: make
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/go-mod-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Run go mod tidy
run: go mod tidy
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Check out code
uses: actions/checkout@v3
Expand All @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Check out code
uses: actions/checkout@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.19.1

- name: Test
run: make test
Expand Down
2 changes: 1 addition & 1 deletion cmd/pint/tests/0023_enabled_checks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ parser {
relaxed = ["rules/.*"]
}
prometheus "prom" {
uri = "https://"
uri = "http://127.0.0.1"
required = true
}

Expand Down
16 changes: 8 additions & 8 deletions cmd/pint/tests/0025_config.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ level=info msg="Loading configuration file" path=.pint.hcl
"prometheus": [
{
"name": "prom",
"uri": "https://",
"uri": "http://127.0.0.1",
"timeout": "2m",
"concurrency": 16,
"rateLimit": 100,
Expand All @@ -22,7 +22,7 @@ level=info msg="Loading configuration file" path=.pint.hcl
},
{
"name": "custom-concurrency",
"uri": "https://",
"uri": "http://127.0.0.1",
"timeout": "2m0s",
"concurrency": 32,
"rateLimit": 100,
Expand All @@ -31,7 +31,7 @@ level=info msg="Loading configuration file" path=.pint.hcl
},
{
"name": "custom-cache",
"uri": "https://",
"uri": "http://127.0.0.1",
"timeout": "10s",
"concurrency": 16,
"rateLimit": 100,
Expand All @@ -40,7 +40,7 @@ level=info msg="Loading configuration file" path=.pint.hcl
},
{
"name": "custom-rateLimit",
"uri": "https://",
"uri": "http://127.0.0.1",
"timeout": "15s",
"concurrency": 16,
"rateLimit": 1,
Expand Down Expand Up @@ -157,25 +157,25 @@ level=info msg="Loading configuration file" path=.pint.hcl
}
-- .pint.hcl --
prometheus "prom" {
uri = "https://"
uri = "http://127.0.0.1"
timeout = "2m"
required = true
}

prometheus "custom-concurrency" {
uri = "https://"
uri = "http://127.0.0.1"
required = false
concurrency = 32
}

prometheus "custom-cache" {
uri = "https://"
uri = "http://127.0.0.1"
timeout = "10s"
cache = 32
}

prometheus "custom-rateLimit" {
uri = "https://"
uri = "http://127.0.0.1"
timeout = "15s"
rateLimit = 1
}
Expand Down
9 changes: 6 additions & 3 deletions cmd/pint/tests/0056_prometheus_required.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
http response prometheus / 500 Offline
http start prometheus 127.0.0.1:7056

pint.ok -l debug --no-color lint rules
! stdout .
stderr 'level=error msg="Query returned an error" error="Post \\"https:///api/v1/query\\": http: no Host in request URL" query=count\(up\) uri=https://'
stderr 'level=error msg="Query returned an error" error="failed to query Prometheus config: Get \\"https:///api/v1/status/config\\": http: no Host in request URL" query=/api/v1/status/config uri=https://'
stderr 'level=error msg="Query returned an error" error="server error: 500" query=count\(up\) uri=http://127.0.0.1:7056'
stderr 'level=error msg="Query returned an error" error="server error: 500" query=/api/v1/status/config uri=http://127.0.0.1:7056'
stderr 'level=info msg="Problems found" Warning=12'

-- rules/1.yaml --
Expand All @@ -17,7 +20,7 @@ stderr 'level=info msg="Problems found" Warning=12'

-- .pint.hcl --
prometheus "prom" {
uri = "https://"
uri = "http://127.0.0.1:7056"
required = false
}
parser {
Expand Down
2 changes: 1 addition & 1 deletion cmd/pint/tests/0079_check_promql_series_invalid.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ level=info msg="Loading configuration file" path=.pint.hcl
level=fatal msg="Fatal error" error="failed to load config file \".pint.hcl\": .pint.hcl:7,3-6: Unsupported argument; An argument named \"bob\" is not expected here."
-- .pint.hcl --
prometheus "prom" {
uri = "https://"
uri = "http://127.0.0.1"
required = true
}

Expand Down
4 changes: 2 additions & 2 deletions internal/checks/promql_series_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,15 +97,15 @@ func TestSeriesCheck(t *testing.T) {
content: "- record: foo\n expr: sum(foo)\n",
checker: newSeriesCheck,
prometheus: func(s string) *promapi.FailoverGroup {
return simpleProm("prom", "http://", time.Second*5, false)
return simpleProm("prom", "http://127.127.127.127", time.Second*5, false)
},
problems: func(uri string) []checks.Problem {
return []checks.Problem{
{
Fragment: "foo",
Lines: []int{2},
Reporter: checks.SeriesCheckName,
Text: checkErrorUnableToRun(checks.SeriesCheckName, "prom", "http://", `Post "http:///api/v1/query": http: no Host in request URL`),
Text: checkErrorUnableToRun(checks.SeriesCheckName, "prom", "http://127.127.127.127", `connection refused`),
Severity: checks.Warning,
},
}
Expand Down

0 comments on commit 85fd6d1

Please sign in to comment.