(t *testing.T)
| 630 | } |
| 631 | |
| 632 | func TestKeyGroupsForFileWithPath(t *testing.T) { |
| 633 | conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfigWithPath, t), "/conf/path", "foo/bar2000", nil) |
| 634 | assert.Nil(t, err) |
| 635 | assert.Equal(t, "2", conf.KeyGroups[0][0].ToString()) |
| 636 | assert.Equal(t, "1", conf.KeyGroups[0][1].ToString()) |
| 637 | conf, err = parseCreationRuleForFile(parseConfigFile(sampleConfigWithPath, t), "/conf/path", "somefilename.yml", nil) |
| 638 | assert.Nil(t, err) |
| 639 | assert.Equal(t, "baggins", conf.KeyGroups[0][0].ToString()) |
| 640 | assert.Equal(t, "bilbo", conf.KeyGroups[0][1].ToString()) |
| 641 | conf, err = parseCreationRuleForFile(parseConfigFile(sampleConfig, t), "/conf/path", "whatever", nil) |
| 642 | assert.Nil(t, err) |
| 643 | assert.Equal(t, "bar", conf.KeyGroups[0][0].ToString()) |
| 644 | assert.Equal(t, "foo", conf.KeyGroups[0][1].ToString()) |
| 645 | } |
| 646 | |
| 647 | func TestKeyGroupsForFileWithGroups(t *testing.T) { |
| 648 | conf, err := parseCreationRuleForFile(parseConfigFile(sampleConfigWithGroups, t), "/conf/path", "whatever", nil) |
nothing calls this directly
no test coverage detected