Skip to content

Commit

Permalink
cli: use .yml consistently in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Freax13 committed Oct 16, 2024
1 parent 89a41ab commit bc20f41
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions cli/cmd/policies_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ func TestPoliciesFromKubeResources(t *testing.T) {
{
name: "valid input",
files: map[string]string{
"deployment.yaml": validDeploymentYAML,
"deployment.yml": validDeploymentYAML,
},
expectedOutput: []deployment{
{
Expand All @@ -83,21 +83,21 @@ func TestPoliciesFromKubeResources(t *testing.T) {
{
name: "missing annotation",
files: map[string]string{
"pod.yaml": podYAML,
"pod.yml": podYAML,
},
},
{
name: "invalid policy annotation",
files: map[string]string{
"deployment.yaml": invalidPolicyYAML,
"deployment.yml": invalidPolicyYAML,
},
expectedErr: "failed to parse policy test",
},
{
name: "multiple files",
files: map[string]string{
"deployment.yaml": validDeploymentYAML,
"pod.yaml": anotherValidPodYAML,
"deployment.yml": validDeploymentYAML,
"pod.yml": anotherValidPodYAML,
},
expectedOutput: []deployment{
{
Expand Down
2 changes: 1 addition & 1 deletion cli/genpolicy/genpolicy_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ func TestRunner(t *testing.T) {
expectedSettingsPath := "/settings.json"
settingsPathFile := filepath.Join(d, "settings_path")
cachePath := filepath.Join(d, "cache", "cache.json")
expectedYAMLPath := filepath.Join(d, "test.yaml")
expectedYAMLPath := filepath.Join(d, "test.yml")
yamlPathFile := filepath.Join(d, "yaml_path")

r, err := New(expectedRulesPath, expectedSettingsPath, cachePath, genpolicyBin)
Expand Down

0 comments on commit bc20f41

Please sign in to comment.