Skip to content

Commit

Permalink
More aggressive debugging; netstat in mitmproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
kegsay committed Dec 1, 2023
1 parent e7d0788 commit 14d9570
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions internal/deploy/deploy.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,28 @@ func RunNewDeployment(t *testing.T, shouldTCPDump bool) *SlidingSyncDeployment {
rpHS1URL := externalURL(t, mitmproxyContainer, hs1ExposedPort)
rpHS2URL := externalURL(t, mitmproxyContainer, hs2ExposedPort)
controllerURL := externalURL(t, mitmproxyContainer, controllerExposedPort)
time.Sleep(time.Second)
execInContainer := func(c testcontainers.Container, cmd []string) {
_, r, err := c.Exec(context.Background(), cmd)
if err != nil {
panic(err)
}
output, err := io.ReadAll(r)
if err != nil {
panic(err)
}
fmt.Println(string(output))
}
execInContainer(mitmproxyContainer, []string{
"apt", "update",
})
execInContainer(mitmproxyContainer, []string{
"apt", "install", "net-tools", "-y",
})
execInContainer(mitmproxyContainer, []string{
"netstat", "-lp",
})
fmt.Println("____________________________")

// Make a postgres container
postgresContainer, err := testcontainers.GenericContainer(context.Background(), testcontainers.GenericContainerRequest{
Expand Down

0 comments on commit 14d9570

Please sign in to comment.