Skip to content

Commit

Permalink
feat: made yamlcheck output more consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
yusufhm committed Feb 14, 2024
1 parent f6495cf commit 568dc14
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pkg/checks/drupal/drushyamlcheck_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ func TestDrushYamlCheckRunCheck(t *testing.T) {
},
ExpectFails: []result.Breach{&result.KeyValueBreach{
BreachType: "key-value",
KeyLabel: "core.extension",
KeyLabel: "config:core.extension",
Key: "profile",
ValueLabel: "actual",
Value: "minimal",
Expand Down
2 changes: 1 addition & 1 deletion pkg/checks/yaml/yaml.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func (c *YamlBase) determineBreaches(configName string) {
})
case KeyValueNotEqual:
c.AddBreach(&result.KeyValueBreach{
KeyLabel: configName,
KeyLabel: "config:" + configName,
Key: kv.Key,
ValueLabel: "actual",
ExpectedValue: kv.Value,
Expand Down
4 changes: 2 additions & 2 deletions pkg/checks/yaml/yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,9 +337,9 @@ notification:
c.Result.DetermineResultStatus(false)
assert.Equal(result.Fail, c.Result.Status)
assert.EqualValues(0, len(c.Result.Passes))
assert.ElementsMatch([]result.Breach{&result.KeyValueBreach{
assert.EqualValues([]result.Breach{&result.KeyValueBreach{
BreachType: result.BreachTypeKeyValue,
KeyLabel: "data",
KeyLabel: "config:data",
Key: "check.interval_days",
ValueLabel: "actual",
Value: "7",
Expand Down

0 comments on commit 568dc14

Please sign in to comment.