test: fix inspect and ls

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
pull/1897/head
CrazyMax 2 years ago
parent 2235ebce2f
commit 75ecc15958
No known key found for this signature in database
GPG Key ID: 3248E46B6BB8C7F7

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

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

Loading…
Cancel
Save