From 769b04b862d647be067993a9a45638ac0534100b Mon Sep 17 00:00:00 2001 From: Achilleas Koutsou Date: Mon, 29 Jul 2024 13:11:11 +0200 Subject: [PATCH] test/api: silent dump_db() When cleaning up api tests, the build job results are dumped from the database to store in build-result.txt and are printed to the runner log at the same time. This makes it very difficult to read results as the database dump prints very long lines that flood the job log. The result isn't really readable (or useful) unless the file is downloaded separately. Silence the `tee` command so that the file is created but no output is printed from the db dump. --- test/cases/api.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cases/api.sh b/test/cases/api.sh index 36ced9444..eb1c89e2c 100755 --- a/test/cases/api.sh +++ b/test/cases/api.sh @@ -199,7 +199,7 @@ checkEnv function dump_db() { # Save the result, including the manifest, for the job, straight from the db sudo "${CONTAINER_RUNTIME}" exec "${DB_CONTAINER_NAME}" psql -U postgres -d osbuildcomposer -c "SELECT result FROM jobs WHERE type='manifest-id-only'" \ - | sudo tee "${ARTIFACTS}/build-result.txt" + | sudo tee "${ARTIFACTS}/build-result.txt" > /dev/null } WORKDIR=$(mktemp -d)