aports/testing/opa/fix-prometheus-test.patch
mio e56d1dbc5e testing/opa: fix test with go 1.24.5
Fix test error with runtime/metrics.

```
--- FAIL: TestJSONSerialization (0.01s)
    prometheus_test.go:189: unexpected extra metrics, expected 117, got 118
    prometheus_test.go:200: unexpected metric: go_godebug_non_default_behavior_allowmultiplevcs_events_total (type: map[help:The number of non-default behaviors executed by the cmd/go package due to a non-default GODEBUG=allowmultiplevcs=... setting. Sourced from /godebug/non-default-behavior/allowmultiplevcs:events. metric:[map[counter:map[createdTimestamp:2025-07-10T02:11:01.527053306Z value:0]]] name:go_godebug_non_default_behavior_allowmultiplevcs_events_total type:COUNTER])
FAIL
FAIL	github.com/open-policy-agent/opa/internal/prometheus	0.017s
```
2025-07-10 05:10:27 +00:00

12 lines
720 B
Diff

diff -ruN a/internal/prometheus/prometheus_test.go b/internal/prometheus/prometheus_test.go
--- a/internal/prometheus/prometheus_test.go 2025-06-30 08:57:36.000000000 +0000
+++ b/internal/prometheus/prometheus_test.go 2025-07-10 03:38:16.780000000 +0000
@@ -117,6 +117,7 @@
"go_cpu_classes_gc_total_cpu_seconds_total",
"go_sync_mutex_wait_total_seconds_total",
"go_cpu_classes_gc_pause_cpu_seconds_total",
+ "go_godebug_non_default_behavior_allowmultiplevcs_events_total", // added in 1.24.5
"go_godebug_non_default_behavior_execerrdot_events_total", // BEGIN added in 1.21
"go_godebug_non_default_behavior_gocachehash_events_total",
"go_godebug_non_default_behavior_gocachetest_events_total",