aboutsummaryrefslogtreecommitdiff
path: root/scripts/testing/tests/test_packages.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/testing/tests/test_packages.py')
-rw-r--r--scripts/testing/tests/test_packages.py49
1 files changed, 49 insertions, 0 deletions
diff --git a/scripts/testing/tests/test_packages.py b/scripts/testing/tests/test_packages.py
index f237088..e0387d6 100644
--- a/scripts/testing/tests/test_packages.py
+++ b/scripts/testing/tests/test_packages.py
@@ -58,3 +58,52 @@ def test_git_installed(host):
@pytest.mark.parametrize("tool", DEV_TOOLS)
def test_dev_tool_present(host, tool):
assert host.exists(tool), "dev tool %s missing from PATH" % tool
+
+
+BLUETOOTH_STACK = ["bluez", "bluez-utils"]
+VPN_STACK = ["wireguard-tools", "proton-vpn-cli", "tailscale"]
+
+
+@pytest.mark.attribution("archsetup")
+@pytest.mark.parametrize("pkg", BLUETOOTH_STACK)
+def test_bluetooth_stack_installed(host, pkg):
+ assert host.package(pkg).is_installed
+
+
+# bt panel replaced blueman; zoom-web replaced zoom; the net panel's Tunnels
+# view + proton-vpn-cli replaced the GTK app (they can't run concurrently).
+RETIRED_PACKAGES = ["blueman", "zoom", "proton-vpn-gtk-app"]
+
+
+@pytest.mark.attribution("archsetup")
+@pytest.mark.parametrize("pkg", RETIRED_PACKAGES)
+def test_retired_package_not_installed(host, pkg):
+ # A reappearance means an install step regressed.
+ assert not host.package(pkg).is_installed
+
+
+@pytest.mark.attribution("archsetup")
+@pytest.mark.parametrize("pkg", VPN_STACK)
+def test_vpn_stack_installed(host, pkg):
+ assert host.package(pkg).is_installed
+
+
+@pytest.mark.attribution("archsetup")
+def test_tailscale_operator_granted(host, target_user):
+ # The installer grants operator so the net panel can toggle tailscale
+ # without sudo. Prefs only answer when the daemon is up.
+ if not host.service("tailscaled").is_running:
+ pytest.skip("tailscaled not running")
+ out = host.run("tailscale debug prefs")
+ assert out.rc == 0, "tailscale debug prefs failed"
+ assert '"OperatorUser": "%s"' % target_user in out.stdout
+
+
+@pytest.mark.attribution("archsetup")
+def test_eask_installed_user_local(host, home):
+ # Installed via npm -g --prefix ~/.local as the user; chime and
+ # linear-emacs shell out to it.
+ f = host.file("%s/.local/bin/eask" % home)
+ assert f.exists, "eask missing from ~/.local/bin"
+ npmrc = host.file("%s/.npmrc" % home)
+ assert npmrc.exists, ".npmrc (user npm prefix) not stowed"