Assert existing pipelines in TestDistro_Manifest

Without the assertion some tests can just pass without actually doing
anything if no matching pipeline jsons exist.

Refs: #442
This commit is contained in:
Jiri Kortus 2020-05-06 18:08:44 +02:00 committed by Alexander Todorov
parent 3cea1f27cf
commit 9315ccb88e

View file

@ -20,6 +20,7 @@ func TestDistro_Manifest(t *testing.T, pipelinePath string, prefix string, distr
assert := assert.New(t)
fileNames, err := filepath.Glob(filepath.Join(pipelinePath, prefix))
assert.NoErrorf(err, "Could not read pipelines directory '%s': %v", pipelinePath, err)
require.Greaterf(t, len(fileNames), 0, "No pipelines found in %s for %s", pipelinePath, prefix)
for _, fileName := range fileNames {
type repository struct {
BaseURL string `json:"baseurl,omitempty"`