Skip to content

Commit

Permalink
upgrade version
Browse files Browse the repository at this point in the history
  • Loading branch information
lvrach committed Sep 23, 2024
1 parent cd443cc commit 198dc4f
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions testhelper/docker/resource/sshserver/sshserver.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ func Setup(pool *dockertest.Pool, cln resource.Cleaner, opts ...Option) (*Resour
}
container, err := pool.RunWithOptions(&dockertest.RunOptions{
Repository: "lscr.io/linuxserver/openssh-server",
Tag: "9.3_p2-r1-ls145",
Tag: "9.7_p1-r4-ls170",
NetworkID: network.ID,
Hostname: "sshserver",
ExposedPorts: []string{
Expand Down Expand Up @@ -151,21 +151,21 @@ loop:
break loop
case <-timeout:

// Print container logs
out := new(bytes.Buffer)
err = pool.Client.Logs(dc.LogsOptions{
Container: container.Container.ID,
OutputStream: out,
ErrorStream: out,
Stdout: true,
Stderr: true,
Follow: false,
})
if err != nil {
return nil, fmt.Errorf("could not fetch container logs: %w", err)
}
fmt.Println("Container logs:\n", out.String())

// Print container logs
out := new(bytes.Buffer)
err = pool.Client.Logs(dc.LogsOptions{
Container: container.Container.ID,
OutputStream: out,
ErrorStream: out,
RawTerminal: false,
Stdout: true,
Stderr: true,
Follow: false,
})
if err != nil {
return nil, fmt.Errorf("could not fetch container logs: %w", err)
}
fmt.Println("Container logs:\n", out.String())

return nil, fmt.Errorf("ssh server not health within timeout")
}
Expand Down

0 comments on commit 198dc4f

Please sign in to comment.