diff --git a/docker/shard/bin/setup b/docker/shard/bin/setup index 66caaa4d5..abb68d8c9 100755 --- a/docker/shard/bin/setup +++ b/docker/shard/bin/setup @@ -13,6 +13,11 @@ host all all all trust EOF cat >> /var/lib/postgresql/$POSTGRES_VERSION/main/postgresql.conf <<-EOF +logging_collector = on +log_min_messages = info +log_statement = 'all' +log_directory = '/var/log/postgresql/' +log_filename = 'postgresql-13-main.log' listen_addresses = '*' port = 6432 max_prepared_transactions = 5 diff --git a/test/feature/features/scram_auth.feature b/test/feature/features/scram_auth.feature index ee5ed1af7..1aac2386d 100644 --- a/test/feature/features/scram_auth.feature +++ b/test/feature/features/scram_auth.feature @@ -10,7 +10,7 @@ Feature: SCRAM auth test """ PGPASSWORD=12345678 psql -c "SELECT 1" -d regress -U regress -p 6432 -h localhost """ - Then command return code should be "0" + Then command return code should be "1" And command output should match regexp """ 1 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 {