From 0d7579a0fa87d6173cd08628519b05c8a20bd673 Mon Sep 17 00:00:00 2001 From: bennetrr Date: Fri, 5 Apr 2024 11:40:16 +0200 Subject: [PATCH] test: fix tests --- README.md | 4 ++-- tests/test_action.py | 14 ++++++-------- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 02dc4af..ae4b520 100644 --- a/README.md +++ b/README.md @@ -38,12 +38,12 @@ for [Conventional Commits](https://www.conventionalcommits.org/) with support fo | `bumping-suffix` | `false` | `hotfix` | The suffix to append to the version (or increment if it already exists) if `only-bump-suffix` is `true`. | | `only-bump-suffix` | `false` | `false` | Bump the `bumping-suffix` instead of the version if changes were detected. | | `create-tag` | `false` | `true` | Create a git tag for the version and push it if a remote is configured. | -| `mode` | `false` | `semantic` | The mode to use for determining the next version. Possible values: `semantic`, `hash-based`. | +| `mode` | `false` | `semantic` | The mode to use for determining the next version. Possible values: `semantic`, `hash-based`. | ## Outputs | Output | Description | -| ----------------------- | ----------------------------------------- | +|-------------------------|-------------------------------------------| | `version` | The next version, without the prefix. | | `version-name` | The next version, with the prefix. | | `previous-version` | The previous version, without the prefix. | diff --git a/tests/test_action.py b/tests/test_action.py index 9b43a17..9b705e5 100644 --- a/tests/test_action.py +++ b/tests/test_action.py @@ -121,12 +121,10 @@ def test_first_fix(self): expected_output_beta = ActionOutputs( version='0.0.1-beta', version_name='v0.0.1-beta', - previous_version='0.0.1-pre', # TODO: Soll das so? Oder sollte da die letzte Version mit -beta - previous_version_name='v0.0.1-pre', # stehen, bzw. '', weil es noch keine letzte Version gab + previous_version='', + previous_version_name='', has_changes=False ) - # TODO: Außerdem wird der Tag für beta nicht erstellt, da keine Changes. - # Der Suffix wurde aber gewechselt, deswegen muss der Tag eigentlich trotzdem erstellt werden. args_prod = ActionArguments( prefix='v', @@ -187,8 +185,8 @@ def test_first_feature(self): expected_output_beta = ActionOutputs( version='0.1.0-beta', version_name='v0.1.0-beta', - previous_version='0.1.0-pre', - previous_version_name='v0.1.0-pre', + previous_version='', + previous_version_name='', has_changes=False ) @@ -251,8 +249,8 @@ def test_first_breaking(self): expected_output_beta = ActionOutputs( version='1.0.0-beta', version_name='v1.0.0-beta', - previous_version='1.0.0-pre', - previous_version_name='v1.0.0-pre', + previous_version='', + previous_version_name='', has_changes=False )