Skip to content

Commit

Permalink
Add test for get_current_version
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanTolksdorf committed Sep 27, 2023
1 parent 24fa909 commit 288ed7c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/version/commands/test_java.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,19 @@ def test_getting_version_no_files_configured(self):

version_file_path.unlink()

def test_getting_version_without_version_config(self):
exp_err_msg = (
r"No /tmp/.*/upgradeVersion\.json config file found\. "
r"This file is required for pontos"
)
with temp_directory(change_into=True), self.assertRaisesRegex(
VersionError,
exp_err_msg,
):
JavaVersionCommand(
SemanticVersioningScheme
).get_current_version()


class VerifyJavaVersionCommandTestCase(unittest.TestCase):
def test_verify_version(self):
Expand Down

0 comments on commit 288ed7c

Please sign in to comment.