From ea72f8a1da3a5c98afa2cd6134962cacc63c184f Mon Sep 17 00:00:00 2001 From: Tomas Peterka Date: Thu, 28 Nov 2024 11:46:30 +0100 Subject: [PATCH] test: Improve user friendliness of tests --- run_tests.sh | 6 +++--- tests/README.md | 28 ++++++++++++++++++++++++++++ tests/run.sh | 2 +- 3 files changed, 32 insertions(+), 4 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index c04228c..5644560 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -2,9 +2,9 @@ set -e # make sure the binaries are available -which git -which envsubst -which gira +which git || (echo "ERROR: git not found" && exit 1) +which envsubst || (echo "ERROR: envsubst not found" && exit 1) +which gira || (echo "ERROR: gira not found" && exit 1) cd tests if bash run.sh > /dev/null; then diff --git a/tests/README.md b/tests/README.md index 61a1174..8073507 100644 --- a/tests/README.md +++ b/tests/README.md @@ -17,3 +17,31 @@ repository. Tests do `git init` and then make commits/changes so the .git repository does not need to be part of gira repository. + +For your convenience - there is a `git log` of tha TARed repository dep1 + +```git +commit 8abae70f337d764e3ffa2ef0637c9eda24d25250 (HEAD -> main, tag: v1.1.1) +Author: Tomas Peterka +Date: Mon Feb 5 17:03:53 2024 +0100 + + fix: add new line at the end of file OCD-567 + +commit 42c27a3e66153a4a5f6317e8adbc4a8d17dad99c (tag: v1.1.0) +Author: Tomas Peterka +Date: Mon Feb 5 15:50:59 2024 +0100 + + feat: add word for better explanation OCD-1234 #close + +commit db11bb42fa82b1f39fdf9ad2fd8a579c7e8f5421 +Author: Tomas Peterka +Date: Mon Feb 5 15:40:38 2024 +0100 + + fix: grammar OCD-1234 + +commit ac804edac73e0494cbfabc8fc1b33c5b1aeafffe (tag: v1.0.0) +Author: Tomas Peterka +Date: Mon Feb 5 15:38:44 2024 +0100 + + initial commit +``` diff --git a/tests/run.sh b/tests/run.sh index b113d3f..c1ba715 100644 --- a/tests/run.sh +++ b/tests/run.sh @@ -37,7 +37,7 @@ echo "-- Test poetry/pyproject.toml" git reset --hard rm -rf .gira_cache output.txt sed -i 's/1.0.0/1.1.1/g' poetry/pyproject.toml -gira -c poetry/pyproject.toml > output.txt +gira -c poetry/pyproject.toml -v > output.txt grep dep1-poetry output.txt grep "1.0.0" output.txt grep "1.1.1" output.txt