diff --git a/exporter/sinks/prom_test.go b/exporter/sinks/prom_test.go index d9cfce0..89e66cc 100644 --- a/exporter/sinks/prom_test.go +++ b/exporter/sinks/prom_test.go @@ -4,13 +4,15 @@ import ( "context" "slices" "strings" + "sync" "testing" "time" - "github.com/castai/promwrite" "github.com/sirupsen/logrus" "github.com/stretchr/testify/require" + "github.com/castai/promwrite" + "github.com/castai/egressd/exporter/config" "github.com/castai/egressd/pb" ) @@ -185,9 +187,12 @@ func TestPromSink(t *testing.T) { type mockPromWriteClient struct { reqs []*promwrite.WriteRequest + m sync.Mutex } func (m *mockPromWriteClient) Write(ctx context.Context, req *promwrite.WriteRequest, options ...promwrite.WriteOption) (*promwrite.WriteResponse, error) { + m.m.Lock() m.reqs = append(m.reqs, req) + m.m.Unlock() return nil, nil } diff --git a/go.mod b/go.mod index 77a0337..1d4038e 100644 --- a/go.mod +++ b/go.mod @@ -2,12 +2,12 @@ module github.com/castai/egressd go 1.22.0 -toolchain go1.22.3 +toolchain go1.22.4 require ( github.com/Code-Hex/go-generics-cache v1.3.1 github.com/castai/promwrite v0.5.0 - github.com/cilium/cilium v1.14.9 + github.com/cilium/cilium v1.14.12 github.com/cilium/ebpf v0.10.1-0.20230626090016-654491c8a500 github.com/florianl/go-conntrack v0.4.0 github.com/google/gopacket v1.1.19 diff --git a/go.sum b/go.sum index 9f5bff8..64a9944 100644 --- a/go.sum +++ b/go.sum @@ -62,6 +62,8 @@ github.com/cilium/checkmate v1.0.3 h1:CQC5eOmlAZeEjPrVZY3ZwEBH64lHlx9mXYdUehEwI5 github.com/cilium/checkmate v1.0.3/go.mod h1:KiBTasf39/F2hf2yAmHw21YFl3hcEyP4Yk6filxc12A= github.com/cilium/cilium v1.14.9 h1:zpdSxRTsS1zTmKiQOcjQcufdbLhWd6xB2P5MUHkPvPs= github.com/cilium/cilium v1.14.9/go.mod h1:C7oSDsowsW95diUPa4C29qEPKpMK2ZcdmmLMIRgyPno= +github.com/cilium/cilium v1.14.12 h1:lQ4XilTUJK5R6BrZnSm4pYxj6jsBQFWlBuRHA5FHJ1I= +github.com/cilium/cilium v1.14.12/go.mod h1:Pjy+qd1hrrXulp78Hs76ahKCttij64LvjxFui9XquVA= github.com/cilium/ebpf v0.5.0/go.mod h1:4tRaxcgiL706VnOzHOdBlY8IEAIdxINsQBcU4xJJXRs= github.com/cilium/ebpf v0.7.0/go.mod h1:/oI2+1shJiTGAMgl6/RgJr36Eo1jzrRcAWbcXO2usCA= github.com/cilium/ebpf v0.10.1-0.20230626090016-654491c8a500 h1:eAn1/gEVvcamZLoF4JKznmG2zKABsF7mRisyfQtwa3Q=