Skip to content

Commit

Permalink
Merge branch 'main' into chore/doctoc
Browse files Browse the repository at this point in the history
  • Loading branch information
lucacome authored Sep 12, 2024
2 parents 5985bf8 + c3e2daa commit 35db554
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
uses: golangci/golangci-lint-action@aaa42aa0628b4ae2578232a66b541047968fac86 # v6.1.0
with:
working-directory: ${{ matrix.directory }}
version: v1.60.3 # renovate: datasource=github-tags depName=golangci/golangci-lint
version: v1.61.0 # renovate: datasource=github-tags depName=golangci/golangci-lint

actionlint:
name: Actionlint
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ repos:
- id: gitleaks

- repo: https://github.com/golangci/golangci-lint
rev: v1.60.3
rev: v1.61.0
hooks:
- id: golangci-lint-full
name: golangci-lint-root
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# renovate: datasource=docker depName=golangci/golangci-lint
GOLANGCI_LINT_VERSION = v1.60.3
GOLANGCI_LINT_VERSION = v1.61.0
.DEFAULT_GOAL := help

.PHONY: help
Expand Down
23 changes: 9 additions & 14 deletions tests/exporter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"log/slog"
"strings"
"sync"
"time"

"github.com/go-logr/logr"
. "github.com/onsi/ginkgo/v2"
Expand Down Expand Up @@ -69,11 +70,10 @@ var _ = Describe("Exporter", func() {
lc *matchingLogConsumer
exporter *telemetry.Exporter
collector testcontainers.Container
ctx context.Context
)

BeforeEach(func() {
ctx = context.Background()
ctx := context.Background()

// Run the collector container

Expand Down Expand Up @@ -108,6 +108,7 @@ var _ = Describe("Exporter", func() {
Started: true,
})
Expect(errCollector).ToNot(HaveOccurred())
DeferCleanup(collector.Terminate, ctx)

// Create the exporter

Expand All @@ -134,18 +135,10 @@ var _ = Describe("Exporter", func() {
telemetry.WithGlobalOTelErrorHandler(errorHandler),
)
Expect(err).ToNot(HaveOccurred())
DeferCleanup(exporter.Shutdown, ctx)
})

AfterEach(func() {
if collector != nil {
Expect(collector.Terminate(ctx)).To(Succeed())
}
if exporter != nil {
Expect(exporter.Shutdown(ctx)).To(Succeed())
}
})

It("exports data successfully", func() {
It("exports data successfully", func(ctx SpecContext) {
lc.setExpectedSubstrings([]string{
"resourceCount: Int(1)",
})
Expand All @@ -156,6 +149,8 @@ var _ = Describe("Exporter", func() {

Expect(exporter.Export(ctx, data)).To(Succeed())

Eventually(lc.unmatchedCount, "10s").Should(BeZero())
})
Eventually(func() int {
return lc.unmatchedCount()
}).WithContext(ctx).Should(BeZero())
}, SpecTimeout(time.Second*10))
})

0 comments on commit 35db554

Please sign in to comment.