1
0
mirror of https://github.com/rancher/os.git synced 2025-09-02 07:15:41 +00:00

Fix image preloading

This commit is contained in:
Josh Curl
2016-08-21 22:51:01 -07:00
parent 7a1609a398
commit 5eda685ff5
4 changed files with 33 additions and 2 deletions

23
tests/preload_test.go Normal file
View File

@@ -0,0 +1,23 @@
package integration
import (
. "gopkg.in/check.v1"
)
func (s *QemuSuite) TestPreload(c *C) {
err := s.RunQemu()
c.Assert(err, IsNil)
s.CheckCall(c, `
docker pull busybox
sudo docker save -o /var/lib/rancher/preload/system-docker/busybox.tar busybox
sudo system-docker pull alpine
sudo system-docker save -o /var/lib/rancher/preload/docker/alpine.tar alpine`)
s.Reboot(c)
s.CheckCall(c, `
sleep 5
sudo system-docker images | grep busybox
docker images | grep alpine`)
}