(t *testing.T)
| 43 | } |
| 44 | |
| 45 | func TestSetenv(t *testing.T) { |
| 46 | f := new("UnitTest2", Bool(true)) |
| 47 | if !f.Enabled() { |
| 48 | t.Fatalf("Flag did not default true") |
| 49 | } |
| 50 | |
| 51 | t.Setenv("KOPS_FEATURE_FLAGS", "-UnitTest2") |
| 52 | if !f.Enabled() { |
| 53 | t.Fatalf("Flag was reparsed immediately after os.Setenv") |
| 54 | } |
| 55 | |
| 56 | ParseFlags("-UnitTest2") |
| 57 | if f.Enabled() { |
| 58 | t.Fatalf("Flag was not updated by ParseFlags") |
| 59 | } |
| 60 | } |
| 61 | |
| 62 | func TestGetPositive(t *testing.T) { |
| 63 | // Find a random existing feature |
nothing calls this directly
no test coverage detected