test: move image-info tests to test/

These tests (will) test more than just image-info: they'll take a
blueprint, verify that `osbuild-pipeline` generates the correct
pipeline, run osbuild with that pipeline and verify that the resulting
image has the expected image-info output.

This change only includes the latter half (i.e., only moves the already
existing tests).

Also drop python's unittest. It was hard to control output (important
for quickly spotting failures and to make travis happy). This introduces
test/run, which runs all test cases in test/cases or the ones given on
the command line.

When a failure occurs, it prints a diff of the actual and the expected
image info.
This commit is contained in:
Lars Karlitski 2019-10-29 19:30:19 +01:00 committed by Tom Gundersen
parent aa404dcb99
commit e7ae3b4c47
17 changed files with 98 additions and 390 deletions

View file

@ -60,7 +60,7 @@ func TestListOutputFormats(t *testing.T) {
}
func TestBlueprint_ToPipeline(t *testing.T) {
pipelinePath := "../../tools/test_image_info/pipelines/"
pipelinePath := "../../test/cases/"
fileInfos, err := ioutil.ReadDir(pipelinePath)
if err != nil {
t.Errorf("Could not read pipelines directory '%s': %v", pipelinePath, err)