Skip to content

Commit

Permalink
try to get more tsic logs
Browse files Browse the repository at this point in the history
Signed-off-by: Kristoffer Dalby <[email protected]>
  • Loading branch information
kradalby committed Dec 9, 2024
1 parent 9771d3a commit cb89bd4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 17 deletions.
27 changes: 11 additions & 16 deletions integration/scenario.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"log"
"net/netip"
"os"
"os/exec"
"sort"
"sync"
"testing"
Expand Down Expand Up @@ -221,10 +220,20 @@ func (s *Scenario) ShutdownAssertNoPanics(t *testing.T) {
for userName, user := range s.users {
for _, client := range user.Clients {
log.Printf("removing client %s in user %s", client.Hostname(), userName)
err := client.Shutdown()
stdoutPath, stderrPath, err := client.Shutdown()
if err != nil {
log.Printf("failed to tear down client: %s", err)
}

if t != nil {
stdout, err := os.ReadFile(stdoutPath)
require.NoError(t, err)
assert.NotContains(t, string(stdout), "panic")

stderr, err := os.ReadFile(stderrPath)
require.NoError(t, err)
assert.NotContains(t, string(stderr), "panic")
}
}
}

Expand Down Expand Up @@ -398,24 +407,10 @@ func (s *Scenario) CreateTailscaleNodesInUser(
return nil
})
}
cmd := exec.Command("docker", "ps")
b, err := cmd.Output()
if err != nil {
return fmt.Errorf("failed to list docker containers: %w", err)
}
log.Printf("docker ps: %s", b)

if err := user.createWaitGroup.Wait(); err != nil {
return err
}

cmd = exec.Command("docker", "ps")
b, err = cmd.Output()
if err != nil {
return fmt.Errorf("failed to list docker containers: %w", err)
}
log.Printf("docker ps: %s", b)

log.Printf("testing versions %v, MustTestVersions %v", lo.Uniq(versions), MustTestVersions)

return nil
Expand Down
2 changes: 1 addition & 1 deletion integration/tailscale.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// nolint
type TailscaleClient interface {
Hostname() string
Shutdown() error
Shutdown() (string, string, error)
Version() string
Execute(
command []string,
Expand Down

0 comments on commit cb89bd4

Please sign in to comment.