tests: improve timeout.
- upgrade k3s to v0.8.0
This commit is contained in:
parent
5d01452648
commit
0f32de4aa2
9 changed files with 54 additions and 33 deletions
|
@ -119,17 +119,32 @@ func (s *BaseSuite) traefikCmd(args ...string) (*exec.Cmd, func(*check.C)) {
|
|||
cmd, out := s.cmdTraefik(args...)
|
||||
return cmd, func(c *check.C) {
|
||||
if c.Failed() || *showLog {
|
||||
s.displayLogK3S(c)
|
||||
s.displayTraefikLog(c, out)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
func (s *BaseSuite) displayLogK3S(c *check.C) {
|
||||
filePath := "./fixtures/k8s/config.skip/k3s.log"
|
||||
if _, err := os.Stat(filePath); err == nil {
|
||||
content, errR := ioutil.ReadFile(filePath)
|
||||
if errR != nil {
|
||||
log.WithoutContext().Error(errR)
|
||||
}
|
||||
log.WithoutContext().Println(string(content))
|
||||
}
|
||||
log.WithoutContext().Println()
|
||||
log.WithoutContext().Println("################################")
|
||||
log.WithoutContext().Println()
|
||||
}
|
||||
|
||||
func (s *BaseSuite) displayTraefikLog(c *check.C, output *bytes.Buffer) {
|
||||
if output == nil || output.Len() == 0 {
|
||||
log.Infof("%s: No Traefik logs.", c.TestName())
|
||||
log.WithoutContext().Infof("%s: No Traefik logs.", c.TestName())
|
||||
} else {
|
||||
log.Infof("%s: Traefik logs: ", c.TestName())
|
||||
log.Infof(output.String())
|
||||
log.WithoutContext().Infof("%s: Traefik logs: ", c.TestName())
|
||||
log.WithoutContext().Infof(output.String())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue