(t *testing.T)
| 227 | } |
| 228 | |
| 229 | func TestGetTelemetryEnabled(t *testing.T) { |
| 230 | // When running under 'go test', GetTelemetryEnabled() always returns false |
| 231 | // because flag.Lookup("test.v") is set. This test verifies that behavior. |
| 232 | assert.False(t, GetTelemetryEnabled(), "Expected telemetry to be disabled during tests") |
| 233 | |
| 234 | // Even with TELEMETRY_ENABLED=true, telemetry is disabled during tests |
| 235 | t.Setenv("TELEMETRY_ENABLED", "true") |
| 236 | assert.False(t, GetTelemetryEnabled(), "Expected telemetry to be disabled during tests even with TELEMETRY_ENABLED=true") |
| 237 | } |
| 238 | |
| 239 | func TestGetTelemetryEnabledFromEnv(t *testing.T) { |
| 240 | // Test the environment variable logic directly (bypassing test detection) |
nothing calls this directly
no test coverage detected