Add pull tests

master
James Mills 2 days ago
parent e552c5c045
commit f332296c94
Signed by: prologic
GPG Key ID: AC4C014F1440EBD6
  1. 2
      tests/cli_test.go
  2. 10
      tests/testdata/pull.ct

@ -29,5 +29,7 @@ func TestCLI(t *testing.T) {
}
ts.DisableLogging = !*verbose
ts.Commands[binaryName] = cmdtest.InProcessProgram(binaryName, cli.Run)
// TODO: Remove this once we add a `box prune` command for cleanup
ts.Commands["rm"] = cmdtest.Program("/bin/rm")
ts.Run(t, *update)
}

@ -0,0 +1,10 @@
# Test the pull command can pull images
$ box pull alpine
Unable to find image library/alpine:latest locally
downloading the image from index.docker.io
# Test that pulling the same image does nothing
$ box pull alpine
# Remove the default box root
$ rm -rf /var/lib/box
Loading…
Cancel
Save