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

Function TestInlineAgentsFeatureAlwaysEnabled

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

Source from the content-addressed store, hash-verified

295}
296
297func TestInlineAgentsFeatureAlwaysEnabled(t *testing.T) {
298 t.Setenv("GH_AW_FEATURES", "")
299
300 tests := []struct {
301 name string
302 features map[string]any
303 }{
304 {
305 name: "enabled when feature absent",
306 features: map[string]any{},
307 },
308 {
309 name: "enabled when explicitly true",
310 features: map[string]any{
311 "inline-agents": true,
312 },
313 },
314 {
315 name: "enabled when explicitly false",
316 features: map[string]any{
317 "inline-agents": false,
318 },
319 },
320 }
321
322 for _, tt := range tests {
323 t.Run(tt.name, func(t *testing.T) {
324 workflowData := &WorkflowData{Features: tt.features}
325 result := isFeatureEnabled("inline-agents", workflowData)
326 if !result {
327 t.Errorf("isFeatureEnabled(%q, %+v) = %v, want true", "inline-agents", tt.features, result)
328 }
329 })
330 }
331}

Callers

nothing calls this directly

Calls 4

isFeatureEnabledFunction · 0.85
SetenvMethod · 0.80
RunMethod · 0.45
ErrorfMethod · 0.45

Tested by

no test coverage detected