test(cmd): enable test cases for GOGC environment variable

Signed-off-by: Will Hegedus <whegedus@akamai.com>
This commit is contained in:
Will Hegedus 2025-05-12 07:47:12 -04:00
parent 33578fedb3
commit 5d94ad9ae0

View File

@ -685,12 +685,11 @@ func TestRuntimeGOGCConfig(t *testing.T) {
name: "empty config file",
expectedGOGC: 75,
},
// the GOGC env var is ignored in this case, see https://github.com/prometheus/prometheus/issues/16334
/* {
{
name: "empty config file with GOGC env var set",
gogcEnvVar: "66",
expectedGOGC: 66,
}, */
},
{
name: "gogc set through config",
config: `
@ -719,15 +718,14 @@ runtime:`,
gogcEnvVar: "88",
expectedGOGC: 88,
},
// the GOGC env var is ignored in this case, see https://github.com/prometheus/prometheus/issues/16334
/* {
name: "unrelated config and GOGC env var set",
config: `
global:
scrape_interval: 500ms`,
gogcEnvVar: "80",
expectedGOGC: 80,
}, */
{
name: "unrelated config and GOGC env var set",
config: `
global:
scrape_interval: 500ms`,
gogcEnvVar: "80",
expectedGOGC: 80,
},
} {
t.Run(tc.name, func(t *testing.T) {
t.Parallel()