diff --git a/tests/version/commands/test_java.py b/tests/version/commands/test_java.py index f37679d3..eb006b8d 100644 --- a/tests/version/commands/test_java.py +++ b/tests/version/commands/test_java.py @@ -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):