custom_docker_test.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. package integration
  2. import . "gopkg.in/check.v1"
  3. func (s *QemuSuite) TestCustomDocker(c *C) {
  4. err := s.RunQemu("--cloud-config", "./tests/assets/test_05/cloud-config.yml")
  5. c.Assert(err, IsNil)
  6. s.CheckCall(c, `
  7. set -ex
  8. docker version | grep 1.10.3
  9. sudo ros engine list | grep 1.10.3 | grep current
  10. docker run -d --restart=always nginx
  11. docker ps | grep nginx`)
  12. s.CheckCall(c, `
  13. set -ex
  14. sudo ros engine switch docker-1.11.2
  15. /usr/sbin/wait-for-docker
  16. docker version | grep 1.11.2
  17. sudo ros engine list | grep 1.11.2 | grep current
  18. docker ps | grep nginx`)
  19. s.Reboot(c)
  20. s.CheckCall(c, `
  21. set -ex
  22. docker version | grep 1.11.2
  23. sudo ros engine list | grep 1.11.2 | grep current
  24. docker ps | grep nginx`)
  25. }
  26. func (s *QemuSuite) TestCustomDockerInPersistentConsole(c *C) {
  27. err := s.RunQemu("--cloud-config", "./tests/assets/test_25/cloud-config.yml")
  28. c.Assert(err, IsNil)
  29. s.CheckCall(c, `
  30. set -ex
  31. apt-get --version
  32. docker version | grep 1.10.3
  33. sudo ros engine list | grep 1.10.3 | grep current
  34. docker run -d --restart=always nginx
  35. docker ps | grep nginx`)
  36. s.CheckCall(c, `
  37. set -ex
  38. sudo ros engine switch docker-1.11.2
  39. /usr/sbin/wait-for-docker
  40. docker version | grep 1.11.2
  41. sudo ros engine list | grep 1.11.2 | grep current
  42. docker ps | grep nginx`)
  43. s.Reboot(c)
  44. s.CheckCall(c, `
  45. set -ex
  46. docker version | grep 1.11.2
  47. sudo ros engine list | grep 1.11.2 | grep current
  48. docker ps | grep nginx`)
  49. }