Skip to content

Commit

Permalink
test: Improve user friendliness of tests
Browse files Browse the repository at this point in the history
  • Loading branch information
katomaso committed Nov 28, 2024
1 parent 63fdc67 commit ea72f8a
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 4 deletions.
6 changes: 3 additions & 3 deletions run_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
28 changes: 28 additions & 0 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <[email protected]>
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 <[email protected]>
Date: Mon Feb 5 15:50:59 2024 +0100
feat: add word for better explanation OCD-1234 #close
commit db11bb42fa82b1f39fdf9ad2fd8a579c7e8f5421
Author: Tomas Peterka <[email protected]>
Date: Mon Feb 5 15:40:38 2024 +0100
fix: grammar OCD-1234
commit ac804edac73e0494cbfabc8fc1b33c5b1aeafffe (tag: v1.0.0)
Author: Tomas Peterka <[email protected]>
Date: Mon Feb 5 15:38:44 2024 +0100
initial commit
```
2 changes: 1 addition & 1 deletion tests/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ea72f8a

Please sign in to comment.