upgrade_test.go 518 B

123456789101112131415161718192021222324252627
  1. package integration
  2. import (
  3. "fmt"
  4. . "gopkg.in/check.v1"
  5. )
  6. func (s *QemuSuite) TestUpgrade(c *C) {
  7. err := s.RunQemuInstalled()
  8. c.Assert(err, IsNil)
  9. s.CheckCall(c, `
  10. set -ex
  11. sudo ros os upgrade -i rancher/os:v0.5.0 --force --no-reboot`)
  12. s.Reboot(c)
  13. s.CheckCall(c, "sudo ros -v | grep v0.5.0")
  14. s.LoadInstallerImage(c)
  15. s.CheckCall(c, fmt.Sprintf("sudo ros os upgrade -i rancher/os:%s%s --force --no-reboot", Version, Suffix))
  16. s.Reboot(c)
  17. s.CheckCall(c, fmt.Sprintf("sudo ros -v | grep %s", Version))
  18. }