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 bca6f2c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/soroban-rpc/internal/test/integration.go
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,9 @@ 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))
fmt.Printf("stderr:\n%s\n", string(exitErr.Stderr))
}
Expand Down Expand Up @@ -456,6 +458,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 bca6f2c

Please sign in to comment.