-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fixes indentation on description fields
- Loading branch information
1 parent
0972d16
commit fae9c79
Showing
4 changed files
with
80 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package metadata_test | ||
|
||
import ( | ||
"io/ioutil" | ||
"testing" | ||
|
||
"github.com/policy-hub/policy-hub-cli/pkg/metaconfig" | ||
"github.com/stretchr/testify/assert" | ||
) | ||
|
||
func TestRegistries(t *testing.T) { | ||
t.Run("check registries.yml file has valid records", func(t *testing.T) { | ||
f, err := ioutil.ReadFile("registries.yml") | ||
assert.NoError(t, err, "Error reading fixture") | ||
config, err := metaconfig.Load(f) | ||
assert.NoError(t, err, "Error loading config") | ||
assert.NotEmpty(t, config) | ||
|
||
t.Run("required fields check", func(t *testing.T) { | ||
for _, registry := range config { | ||
assert.NotEmpty(t, registry.Path) | ||
assert.NotEmpty(t, registry.Name) | ||
assert.NotEmpty(t, registry.Labels) | ||
assert.NotEmpty(t, registry.Description) | ||
} | ||
}) | ||
}) | ||
} |