Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit 694c659

Browse files
committed
fix broken test
Signed-off-by: Sean Teeling <[email protected]>
1 parent 0e8c653 commit 694c659

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmd/osm-healthcheck/osm-healthcheck_test.go

+2
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ func TestGetHealthcheckHander(t *testing.T) {
5858
//#nosec G307
5959
defer listener.Close()
6060

61+
// required to avoid https://github.com/golang/go/wiki/CommonMistakes#using-goroutines-on-loop-iterator-variables
62+
test := test
6163
go func() {
6264
conn, err := listener.Accept()
6365
assert.Nil(err)

pkg/envoy/ads/response_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ var _ = Describe("Test ADS response functions", func() {
172172
CertType: secrets.ServiceCertType,
173173
}.String()))
174174

175-
Expect(metricsstore.DefaultMetricsStore.Contains(fmt.Sprintf("osm_proxy_response_send_success_count{proxy_name=%q,type=%q} 1\n", proxy.GetName(), envoy.TypeCDS))).To(BeTrue())
175+
Expect(metricsstore.DefaultMetricsStore.Contains(fmt.Sprintf("osm_proxy_response_send_success_count{identity=%q,proxy_uuid=%q,type=%q} 1\n", proxy.Identity, proxy.UUID, envoy.TypeCDS))).To(BeTrue())
176176
})
177177
})
178178

0 commit comments

Comments
 (0)