Skip to content

Commit

Permalink
Debug RPC container
Browse files Browse the repository at this point in the history
  • Loading branch information
2opremio committed Jun 13, 2024
1 parent 078fe48 commit 5c4c87e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/soroban-rpc/internal/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,8 +334,12 @@ func (i *Test) runComposeCommand(args ...string) {

i.t.Log("Running", cmd.Env, cmd.Args)
out, innerErr := cmd.Output()
if exitErr, ok := innerErr.(*exec.ExitError); ok {
exitErr, ok := innerErr.(*exec.ExitError)
// TODO: make this cleaner
if ok || args[0] == "logs" {
fmt.Printf("stdout:\n%s\n", string(out))
}
if ok {
fmt.Printf("stderr:\n%s\n", string(exitErr.Stderr))
}

Expand Down Expand Up @@ -456,6 +460,7 @@ func (i *Test) StopRPC() {
i.daemon = nil
}
if i.rpcContainerVersion != "" {
i.runComposeCommand("logs", "rpc")
i.runComposeCommand("down", "rpc", "-v")
}
}
Expand Down

0 comments on commit 5c4c87e

Please sign in to comment.