MCPcopy
hub / github.com/getsops/sops / TestLoadConfigFileWithComplicatedRegexp

Function TestLoadConfigFileWithComplicatedRegexp

config/config_test.go:591–601  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

589}
590
591func 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
603func TestLoadEmptyConfigFile(t *testing.T) {
604 conf, err := parseCreationRuleForFile(parseConfigFile(sampleEmptyConfig, t), "/conf/path", "foobar2000", nil)

Callers

nothing calls this directly

Calls 3

parseCreationRuleForFileFunction · 0.85
parseConfigFileFunction · 0.85
ToStringMethod · 0.65

Tested by

no test coverage detected