From df32dfdc70cfff06aa24913d6a9ca23e3768aaeb Mon Sep 17 00:00:00 2001 From: Sven Dowideit Date: Thu, 2 Mar 2017 14:30:13 +1000 Subject: [PATCH] try to debug Drone failures - I think its just timing out. Signed-off-by: Sven Dowideit --- tests/common_test.go | 6 ++++-- tests/network_on_boot_test.go | 0 tests/upgrade_test.go | 14 +++++++------- 3 files changed, 11 insertions(+), 9 deletions(-) mode change 100644 => 100755 tests/network_on_boot_test.go diff --git a/tests/common_test.go b/tests/common_test.go index 14fef530..b1b53cea 100755 --- a/tests/common_test.go +++ b/tests/common_test.go @@ -106,7 +106,8 @@ func (s *QemuSuite) WaitForSSH() error { if err = cmd.Run(); err == nil { break } - time.Sleep(500 * time.Millisecond) + fmt.Printf("s%d", i) + time.Sleep(time.Second) } if err != nil { @@ -126,6 +127,7 @@ func (s *QemuSuite) WaitForSSH() error { if err = cmd.Run(); err == nil { return nil } + fmt.Printf("d%d", i) time.Sleep(500 * time.Millisecond) } @@ -185,7 +187,7 @@ func (s *QemuSuite) LoadInstallerImage(c *C) { c.Assert(cmd.Run(), IsNil) } -func (s *QemuSuite) PullAndLoadInstallerImage(c *C, image string) { +func (s *QemuSuite) PullAndLoadImage(c *C, image string) { cmd := exec.Command("sh", "-c", fmt.Sprintf("docker pull %s", image)) cmd.Stdout = os.Stdout cmd.Stderr = os.Stderr diff --git a/tests/network_on_boot_test.go b/tests/network_on_boot_test.go old mode 100644 new mode 100755 diff --git a/tests/upgrade_test.go b/tests/upgrade_test.go index 0f63f79c..96ba9c1b 100755 --- a/tests/upgrade_test.go +++ b/tests/upgrade_test.go @@ -51,7 +51,7 @@ func (s *QemuSuite) DisableTestUpgradeInner(c *C) { c.Assert(Version, Equals, version) fmt.Printf("installing %s", startWithVersion) - s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os:%s", startWithVersion)) + s.PullAndLoadImage(c, fmt.Sprintf("rancher/os:%s", startWithVersion)) //ADD a custom append line and make sure its kept in the upgraded version too @@ -77,10 +77,10 @@ sync if console != "default" { // Can't preload the startWithVersion console image, as some don't exist by that name - not sure how to approach that - //s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, startWithVersion)) + //s.PullAndLoadImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, startWithVersion)) // TODO: ouch. probably need to tag the dev / master version as latest cos this won't work // Need to pull the image here - if we do it at boot, then the test will fail. - s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc3")) + s.PullAndLoadImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc3")) s.MakeCall(fmt.Sprintf("sudo ros console switch -f %s", console)) c.Assert(s.WaitForSSH(), IsNil) } @@ -111,7 +111,7 @@ func (s *QemuSuite) commonTestCode(c *C, startWithVersion, console string) { c.Assert(Version, Equals, version) fmt.Printf("installing %s", startWithVersion) - s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os:%s", startWithVersion)) + s.PullAndLoadImage(c, fmt.Sprintf("rancher/os:%s", startWithVersion)) //ADD a custom append line and make sure its kept in the upgraded version too @@ -137,13 +137,13 @@ sync if console != "default" { // Can't preload the startWithVersion console image, as some don't exist by that name - not sure how to approach that - //s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, startWithVersion)) + //s.PullAndLoadImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, startWithVersion)) // TODO: ouch. probably need to tag the dev / master version as latest cos this won't work // Need to pull the image here - if we do it at boot, then the test will fail. if console == "alpine" { - s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc5")) + s.PullAndLoadImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc5")) } else { - s.PullAndLoadInstallerImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc3")) + s.PullAndLoadImage(c, fmt.Sprintf("rancher/os-%sconsole:%s", console, "v0.8.0-rc3")) } s.MakeCall(fmt.Sprintf("sudo ros console switch -f %s", console)) c.Assert(s.WaitForSSH(), IsNil)