(t *testing.T)
| 295 | } |
| 296 | |
| 297 | func 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 | } |
nothing calls this directly
no test coverage detected