Skip to content

Commit

Permalink
Merge dependabot, deps upgrades; fix linter
Browse files Browse the repository at this point in the history
  • Loading branch information
jwkohnen committed Feb 13, 2024
6 parents 02252f1 + 9625c37 + 529fe1e + 724fa7d + e3681b9 + 3683606 commit 6754e8d
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
tags:
- v*
branches:
- main
- '**'
pull_request:
permissions:
contents: read
Expand All @@ -20,7 +20,7 @@ jobs:
go-version: 1.18
- uses: actions/checkout@v4
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
uses: golangci/golangci-lint-action@v4
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: latest
Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
FROM golang:1.21.5 as build
FROM golang:1.22.0 as build
WORKDIR /conntrack-stats-exporter
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go mod verify
RUN ./build.sh

FROM alpine:3.19.0
FROM alpine:3.19.1
COPY --from=build /conntrack-stats-exporter/conntrack-stats-exporter /usr/local/sbin/
RUN apk update && \
apk --no-cache upgrade && \
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile-race
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.21.5 as build
FROM golang:1.22.0 as build
WORKDIR /conntrack-stats-exporter
COPY go.mod go.sum ./
RUN go mod download
Expand Down
6 changes: 5 additions & 1 deletion exporter/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,7 @@ func TestScrapeError(t *testing.T) {
defer wg.Done()

start := time.Now()

resp, err := client.Do(req)
if err != nil {
t.Error(err)
Expand Down Expand Up @@ -287,10 +288,12 @@ func TestScrapeError(t *testing.T) {
timings := make([]time.Duration, concurrency)

wg := new(sync.WaitGroup)
wg.Add(concurrency)

for i := 0; i < concurrency; i++ {
i := i

wg.Add(1)

go func() {
defer wg.Done()

Expand Down Expand Up @@ -333,6 +336,7 @@ func TestScrapeError(t *testing.T) {
defer wg.Done()

start := time.Now()

resp, err := client.Do(req)
if err != nil {
t.Error(err)
Expand Down

0 comments on commit 6754e8d

Please sign in to comment.