preload_test.go 513 B

123456789101112131415161718192021222324
  1. package integration
  2. import (
  3. . "gopkg.in/check.v1"
  4. )
  5. func (s *QemuSuite) TestPreload(c *C) {
  6. s.RunQemu(c)
  7. s.CheckCall(c, `
  8. docker pull busybox
  9. sudo docker save -o /var/lib/rancher/preload/system-docker/busybox.tar busybox
  10. sudo gzip /var/lib/rancher/preload/system-docker/busybox.tar
  11. sudo system-docker pull alpine
  12. sudo system-docker save -o /var/lib/rancher/preload/docker/alpine.tar alpine`)
  13. s.Reboot(c)
  14. s.CheckCall(c, `
  15. sleep 5
  16. sudo system-docker images | grep busybox
  17. docker images | grep alpine`)
  18. }