test: set PYTHONPATH for image-info on travis

Create a GetImageInfoCommand analogous to GetOsbuildCommand that
will adjust the PYTHONPATH for image-info on travis so that the
osbuild python module is accessible.
This commit is contained in:
Christian Kellner 2020-07-08 23:40:09 +02:00 committed by Ondřej Budai
parent 84022a7889
commit 44f0ba368f
3 changed files with 21 additions and 2 deletions

View file

@ -73,7 +73,7 @@ func testImageInfo(t *testing.T, imagePath string, rawImageInfoExpected []byte)
err := json.Unmarshal(rawImageInfoExpected, &imageInfoExpected)
require.NoErrorf(t, err, "cannot decode expected image info: %#v", err)
cmd := exec.Command(constants.TestPaths.ImageInfo, imagePath)
cmd := constants.GetImageInfoCommand(imagePath)
cmd.Stderr = os.Stderr
reader, writer := io.Pipe()
cmd.Stdout = writer