Skip to content

Commit

Permalink
test: fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bennetrr committed Apr 5, 2024
1 parent 02700e5 commit 0d7579a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. |
Expand Down
14 changes: 6 additions & 8 deletions tests/test_action.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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
)

Expand Down Expand Up @@ -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
)

Expand Down

0 comments on commit 0d7579a

Please sign in to comment.