diff options
Diffstat (limited to 'packages/meshbay-hub')
| -rw-r--r-- | packages/meshbay-hub/tests/test_android_shell.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/meshbay-hub/tests/test_android_shell.py b/packages/meshbay-hub/tests/test_android_shell.py index e569bb7..71832f2 100644 --- a/packages/meshbay-hub/tests/test_android_shell.py +++ b/packages/meshbay-hub/tests/test_android_shell.py @@ -215,6 +215,17 @@ def test_the_version_is_the_packages_version(): assert not re.search(r'versionName = "\d', build) +def test_a_release_is_signed_with_the_release_key_or_not_built(): + """The key's path and passwords come from outside the repository, and a + release build without them stops instead of signing with the debug key.""" + build = _strip_js_comments(_read(APP / "build.gradle.kts")) + assert 'signingConfigs.getByName("debug")' not in build + assert 'signingConfigs.findByName("release")' in build + assert 'providers.gradleProperty("meshbayReleaseStorePassword")' in build + assert '"preReleaseBuild"' in build and "throw GradleException" in build + assert not re.search(r'storePassword = "', build) + + @pytest.mark.skipif(not os.environ.get("ANDROID_HOME") or shutil.which("java") is None, reason="no Android SDK in the environment") def test_the_jvm_unit_tests_pass(): |