aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_packaging_win.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_packaging_win.py')
-rw-r--r--packages/meshbay-node/tests/test_packaging_win.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_packaging_win.py b/packages/meshbay-node/tests/test_packaging_win.py
index 6ee4891..0110b6c 100644
--- a/packages/meshbay-node/tests/test_packaging_win.py
+++ b/packages/meshbay-node/tests/test_packaging_win.py
@@ -1497,6 +1497,27 @@ def test_msix_gives_the_cli_an_execution_alias_and_the_windows_it_needs():
assert 'xmlns:uap5="http://schemas.microsoft.com/appx/manifest/uap/windows10/5"' in xml
+def test_msix_gives_the_command_line_client_an_alias_of_its_own_application():
+ """An Application may declare one windows.appExecutionAlias extension.
+ meshbay-node.exe has the app's; a second one beside it for meshbay-cli.exe
+ made makeappx refuse the whole package ("must only be declared once"), at
+ the very end of a Store build. The client is an Application of its own,
+ kept out of the Start menu, with its alias and its firewall rule."""
+ xml = MSIX_MANIFEST_XML.read_text(encoding="utf-8")
+ ext = MSIX_EXTENSIONS_XML.read_text(encoding="utf-8")
+ assert ext.count('Category="windows.appExecutionAlias"') == 1
+ apps = re.findall(r"<Application\b.*?</Application>", xml, re.S)
+ for app in apps:
+ assert app.count('Category="windows.appExecutionAlias"') <= 1, app[:80]
+ [cli] = [a for a in apps if 'Executable="app\\resources\\node-runtime\\meshbay-cli.exe"'
+ in a.split(">", 1)[0]]
+ assert 'AppListEntry="none"' in cli
+ assert 'Alias="meshbay-cli.exe"' in cli
+ package_level = xml.split("</Applications>", 1)[1]
+ rule = package_level.split('Executable="app\\resources\\node-runtime\\meshbay-cli.exe"', 1)
+ assert len(rule) == 2 and 'IPProtocol="UDP"' in rule[1].split("</desktop2:", 1)[0]
+
+
def test_the_node_runtime_has_a_windowless_daemon_beside_the_cli():
spec = (WIN / "meshbay-node.spec").read_text(encoding="utf-8")
windowless = spec.split('name="meshbay-nodew"', 1)