mirror of https://github.com/docker/buildx.git
test: fix inspect and ls
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
2235ebce2f
commit
75ecc15958
|
@ -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)
|
||||
}
|
||||
|
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue