The CLI no longer disables/hides experimental CLI features, however, we need to verify that existing configuration files do not break
(t *testing.T)
| 401 | // The CLI no longer disables/hides experimental CLI features, however, we need |
| 402 | // to verify that existing configuration files do not break |
| 403 | func TestLoadLegacyExperimental(t *testing.T) { |
| 404 | tests := []struct { |
| 405 | doc string |
| 406 | configfile string |
| 407 | }{ |
| 408 | { |
| 409 | doc: "default", |
| 410 | configfile: `{}`, |
| 411 | }, |
| 412 | { |
| 413 | doc: "experimental", |
| 414 | configfile: `{ |
| 415 | "experimental": "enabled" |
| 416 | }`, |
| 417 | }, |
| 418 | } |
| 419 | for _, tc := range tests { |
| 420 | t.Run(tc.doc, func(t *testing.T) { |
| 421 | _, err := LoadFromReader(strings.NewReader(tc.configfile)) |
| 422 | assert.NilError(t, err) |
| 423 | }) |
| 424 | } |
| 425 | } |
| 426 | |
| 427 | func TestConfigPath(t *testing.T) { |
| 428 | oldDir := Dir() |
nothing calls this directly
no test coverage detected
searching dependent graphs…