weldr: reuse api for all test cases in TestCompose

This commit is contained in:
Achilleas Koutsou 2022-01-14 19:20:15 +01:00 committed by Ondřej Budai
parent 646fbe93c7
commit 01b2b15ebc

View file

@ -128,8 +128,8 @@ func TestBasic(t *testing.T) {
require.NoError(t, err)
defer os.RemoveAll(tempdir)
api, _ := createWeldrAPI(tempdir, rpmmd_mock.BaseFixture)
for _, c := range cases {
api, _ := createWeldrAPI(tempdir, rpmmd_mock.BaseFixture)
test.TestRoute(t, api, true, "GET", c.Path, ``, c.ExpectedStatus, c.ExpectedJSON)
}
}