http_proxy_test.go 596 B

123456789101112131415161718192021222324252627282930313233
  1. package integration
  2. import . "gopkg.in/check.v1"
  3. func (s *QemuSuite) TestHttpProxy(c *C) {
  4. err := s.RunQemu("--cloud-config", "./tests/assets/test_17/cloud-config.yml")
  5. c.Assert(err, IsNil)
  6. s.CheckCall(c, `
  7. set -x -e
  8. sudo system-docker inspect docker env | grep HTTP_PROXY=invalid
  9. sudo system-docker inspect docker env | grep HTTPS_PROXY=invalid
  10. sudo system-docker inspect docker env | grep NO_PROXY=invalid
  11. if docker pull busybox; then
  12. exit 1
  13. else
  14. exit 0
  15. fi`)
  16. s.Reboot(c)
  17. s.CheckCall(c, `
  18. set -x -e
  19. if sudo system-docker pull busybox; then
  20. exit 1
  21. else
  22. exit 0
  23. fi`)
  24. }