INNER CODE UNIT · Go

TestLoadFromEnvInvalid

kuberhealthy/kuberhealthy · cmd/kuberhealthy/config_test.go:111

func TestLoadFromEnvInvalid(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping invalid config test in short mode")
	}
	t.Setenv("KH_MAX_JOB_AGE", "not-a-duration")
	cfg := New()
	err := cfg.LoadFromEnv()
	if err == nil {
		t.Fatalf("expected error for invalid duration")
	}
}

// TestReportingURLDefaultsFromNamespace constructs the reporting URL using the pod namespace when unset.
func TestReportingURLDefaultsFromNamespace(t *testing.T) {
	if testing.Short() {
		t.Skip("skipping reporting URL test in short mode")
	}
	t.Setenv("POD_NAMESPACE", "ns1")

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…