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

Function TestIsFeatureEnabledWithDataNilWorkflow

pkg/workflow/features_test.go:203–212  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

201}
202
203func TestIsFeatureEnabledWithDataNilWorkflow(t *testing.T) {
204 // Set environment variable
205 t.Setenv("GH_AW_FEATURES", "firewall")
206
207 // When workflowData is nil, should fall back to env
208 result := isFeatureEnabled(constants.FeatureFlag("firewall"), nil)
209 if result != true {
210 t.Errorf("isFeatureEnabled(\"firewall\", nil) with env=firewall = %v, want true", result)
211 }
212}
213
214// TestMergedFeaturesAreUsedByIsFeatureEnabled verifies that features merged from imports
215// are accessible via isFeatureEnabled function

Callers

nothing calls this directly

Calls 4

FeatureFlagTypeAlias · 0.92
isFeatureEnabledFunction · 0.85
SetenvMethod · 0.80
ErrorfMethod · 0.45

Tested by

no test coverage detected