test: fix inspect and ls

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
CrazyMax 2023-06-19 08:50:28 +02:00
parent 2235ebce2f
commit 75ecc15958
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7
2 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,8 @@ func testInspect(t *testing.T, sb integration.Sandbox) {
driver = strings.TrimSpace(v)
}
}
require.Equal(t, sb.Address(), name)
require.Equal(t, sb.Name(), driver)
sbDriver, _, _ := strings.Cut(sb.Name(), "+")
require.Equal(t, sbDriver, driver)
}

View File

@ -23,9 +23,10 @@ func testLs(t *testing.T, sb integration.Sandbox) {
out, err := lsCmd(sb)
require.NoError(t, err, string(out))
sbDriver, _, _ := strings.Cut(sb.Name(), "+")
for _, line := range strings.Split(out, "\n") {
if strings.Contains(line, sb.Address()) {
require.Contains(t, line, sb.Name())
require.Contains(t, line, sbDriver)
return
}
}