From bca6f2c72739308261ebde145061ec2e16fa1c34 Mon Sep 17 00:00:00 2001 From: Alfonso Acosta Date: Thu, 13 Jun 2024 21:46:47 +0200 Subject: [PATCH] Debug RPC container --- cmd/soroban-rpc/internal/test/integration.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cmd/soroban-rpc/internal/test/integration.go b/cmd/soroban-rpc/internal/test/integration.go index 13779378..b4e9e5e7 100644 --- a/cmd/soroban-rpc/internal/test/integration.go +++ b/cmd/soroban-rpc/internal/test/integration.go @@ -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)) } @@ -456,6 +458,7 @@ func (i *Test) StopRPC() { i.daemon = nil } if i.rpcContainerVersion != "" { + i.runComposeCommand("logs", "rpc") i.runComposeCommand("down", "rpc", "-v") } }