(t *testing.T)
| 589 | } |
| 590 | |
| 591 | func TestLoadConfigFileWithComplicatedRegexp(t *testing.T) { |
| 592 | for filePath, k := range map[string]string{ |
| 593 | "stage/prod/api.yml": "default", |
| 594 | "stage/dev/feature-foo.yml": "dev-feature", |
| 595 | "stage/dev/api.yml": "dev", |
| 596 | } { |
| 597 | conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfigWithComplicatedRegexp, t), "/conf/path", filePath, nil) |
| 598 | assert.Nil(t, err) |
| 599 | assert.Equal(t, k, conf.KeyGroups[0][0].ToString()) |
| 600 | } |
| 601 | } |
| 602 | |
| 603 | func TestLoadEmptyConfigFile(t *testing.T) { |
| 604 | conf, err := parseCreationRuleForFile(parseConfigFile(sampleEmptyConfig, t), "/conf/path", "foobar2000", nil) |
nothing calls this directly
no test coverage detected