image-tests: skip tests if the test case cannot be opened
Schutzbot currently runs all the same tests an all arches/distro combinations. This will not work as we introduce image types only on some distro/arches. In the future we should make the image-test binary more clever, so Schutzbot won't have to tell it which cases to run at all. For now, simply don't fail if the specified test-case does not exist. Signed-off-by: Tom Gundersen <teg@jklm.no>
This commit is contained in:
parent
b8f4b9eae9
commit
31f7bd9e74
1 changed files with 3 additions and 1 deletions
|
|
@ -399,7 +399,9 @@ func runTests(t *testing.T, cases []string) {
|
|||
for _, path := range cases {
|
||||
t.Run(path, func(t *testing.T) {
|
||||
f, err := os.Open(path)
|
||||
require.NoErrorf(t, err, "%s: cannot open test case: %#v", path, err)
|
||||
if err != nil {
|
||||
t.Skipf("%s: cannot open test case: %#v", path, err)
|
||||
}
|
||||
|
||||
var testcase testcaseStruct
|
||||
err = json.NewDecoder(f).Decode(&testcase)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue