1
0
mirror of https://github.com/rancher/os.git synced 2025-06-25 14:31:33 +00:00

try to debug Drone failures - I think its just timing out.

Signed-off-by: Sven Dowideit <SvenDowideit@home.org.au>
This commit is contained in:
Sven Dowideit 2017-03-02 14:30:13 +10:00
parent 10a4c59385
commit df32dfdc70
3 changed files with 11 additions and 9 deletions

View File

@ -106,7 +106,8 @@ func (s *QemuSuite) WaitForSSH() error {
if err = cmd.Run(); err == nil { if err = cmd.Run(); err == nil {
break break
} }
time.Sleep(500 * time.Millisecond) fmt.Printf("s%d", i)
time.Sleep(time.Second)
} }
if err != nil { if err != nil {
@ -126,6 +127,7 @@ func (s *QemuSuite) WaitForSSH() error {
if err = cmd.Run(); err == nil { if err = cmd.Run(); err == nil {
return nil return nil
} }
fmt.Printf("d%d", i)
time.Sleep(500 * time.Millisecond) time.Sleep(500 * time.Millisecond)
} }
@ -185,7 +187,7 @@ func (s *QemuSuite) LoadInstallerImage(c *C) {
c.Assert(cmd.Run(), IsNil) 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 := exec.Command("sh", "-c", fmt.Sprintf("docker pull %s", image))
cmd.Stdout = os.Stdout cmd.Stdout = os.Stdout
cmd.Stderr = os.Stderr cmd.Stderr = os.Stderr

0
tests/network_on_boot_test.go Normal file → Executable file
View File

View File

@ -51,7 +51,7 @@ func (s *QemuSuite) DisableTestUpgradeInner(c *C) {
c.Assert(Version, Equals, version) c.Assert(Version, Equals, version)
fmt.Printf("installing %s", startWithVersion) 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 //ADD a custom append line and make sure its kept in the upgraded version too
@ -77,10 +77,10 @@ sync
if console != "default" { if console != "default" {
// Can't preload the startWithVersion console image, as some don't exist by that name - not sure how to approach that // 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 // 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. // 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)) s.MakeCall(fmt.Sprintf("sudo ros console switch -f %s", console))
c.Assert(s.WaitForSSH(), IsNil) c.Assert(s.WaitForSSH(), IsNil)
} }
@ -111,7 +111,7 @@ func (s *QemuSuite) commonTestCode(c *C, startWithVersion, console string) {
c.Assert(Version, Equals, version) c.Assert(Version, Equals, version)
fmt.Printf("installing %s", startWithVersion) 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 //ADD a custom append line and make sure its kept in the upgraded version too
@ -137,13 +137,13 @@ sync
if console != "default" { if console != "default" {
// Can't preload the startWithVersion console image, as some don't exist by that name - not sure how to approach that // 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 // 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. // Need to pull the image here - if we do it at boot, then the test will fail.
if console == "alpine" { 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 { } 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)) s.MakeCall(fmt.Sprintf("sudo ros console switch -f %s", console))
c.Assert(s.WaitForSSH(), IsNil) c.Assert(s.WaitForSSH(), IsNil)