MCPcopy Create free account
hub / github.com/github/gh-aw / TestSpec_ConfigPrecedence_DefaultFallback

Function TestSpec_ConfigPrecedence_DefaultFallback

pkg/github/spec_test.go:272–279  ·  view source on GitHub ↗

TestSpec_Functions_LoadObjectiveMappingFromConfig validates that, absent any environment or config-file override, LoadObjectiveMappingFromConfig falls back to the built-in defaults (precedence step 3 in the README). This test deliberately does not set OBJECTIVE_MAPPING_JSON; in the absence of a rep

(t *testing.T)

Source from the content-addressed store, hash-verified

270// This test deliberately does not set OBJECTIVE_MAPPING_JSON; in the absence of
271// a repository .github/objective-mapping.json it must return the defaults.
272func TestSpec_ConfigPrecedence_DefaultFallback(t *testing.T) {
273 t.Setenv("OBJECTIVE_MAPPING_JSON", "")
274
275 om := github.LoadObjectiveMappingFromConfig()
276 require.NotNil(t, om, "LoadObjectiveMappingFromConfig should never return nil")
277 assert.Equal(t, github.MultiLabelLogicMax, om.MultiLabelLogic,
278 "the default fallback mapping should use \"max\" logic")
279}
280
281// SPEC_MISMATCH: The README "Usage Examples" section illustrates
282// ComputeObjectiveValue([]string{"bug","high-priority"}) == 60 and

Callers

nothing calls this directly

Calls 2

SetenvMethod · 0.80

Tested by

no test coverage detected