From 26fe3e26e093f33fb74f18ff038bcc13e6530da4 Mon Sep 17 00:00:00 2001 From: evazion Date: Wed, 27 Oct 2021 04:59:21 -0500 Subject: [PATCH] tests: silence output from pg_amcheck. Fix pg_amcheck flooding the test suite output in Github. --- app/jobs/amcheck_database_job.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/jobs/amcheck_database_job.rb b/app/jobs/amcheck_database_job.rb index aa63e93d5..388f79da9 100644 --- a/app/jobs/amcheck_database_job.rb +++ b/app/jobs/amcheck_database_job.rb @@ -3,8 +3,8 @@ # # https://www.postgresql.org/docs/14/app-pgamcheck.html class AmcheckDatabaseJob < ApplicationJob - def perform(options: "--verbose --install-missing --heapallindexed --parent-check") - return unless system("pg_amcheck --version") + def perform(options: "--verbose --install-missing --heapallindexed --parent-check 2>&1") + return unless system("pg_amcheck --version > /dev/null") connection_url = ApplicationRecord.connection_db_config.url output = %x(PGDATABASE="#{connection_url}" pg_amcheck #{options})