From abb4453f5bfcf858e37e2c07e84c8032d1fb41a2 Mon Sep 17 00:00:00 2001 From: Yury Frolov Date: Tue, 16 Apr 2024 15:21:14 +0500 Subject: [PATCH] Print debug from shards, too --- test/feature/spqr_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/test/feature/spqr_test.go b/test/feature/spqr_test.go index 90bd30331..ef4084845 100644 --- a/test/feature/spqr_test.go +++ b/test/feature/spqr_test.go @@ -92,6 +92,20 @@ func (tctx *testContext) saveLogs(scenario string) error { var logsToSave map[string]string switch { case strings.HasPrefix(service, spqrShardName): + for file := range postgresqlLogsToSave { + remoteFile, err := tctx.composer.GetFile(service, file) + if err != nil { + errs = append(errs, err) + continue + } + content, err := io.ReadAll(remoteFile) + if err != nil { + errs = append(errs, err) + continue + } + fmt.Printf("\"%s\" shard logs:\n", service) + fmt.Println(string(content)) + } logsToSave = postgresqlLogsToSave case strings.HasPrefix(service, spqrRouterName): for file := range routerLogsToSave {