aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmd/fpkg/test
diff options
context:
space:
mode:
authorOphestra <cat@gensokyo.uk>2025-06-25 03:59:52 +0900
committerOphestra <cat@gensokyo.uk>2025-06-25 04:57:41 +0900
commit87e008d56de974947ebb99c2cc40b25d3c2cf43e (patch)
tree31791911e5226d6ec04e3fac7d91b0bf53e63aa5 /cmd/fpkg/test
parent399207321265307bb15f37d867f9370cd51c82a8 (diff)
treewide: rename to hakurei
Fortify makes little sense for a container tool. Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'cmd/fpkg/test')
-rw-r--r--cmd/fpkg/test/configuration.nix4
-rw-r--r--cmd/fpkg/test/default.nix2
-rw-r--r--cmd/fpkg/test/test.py22
3 files changed, 14 insertions, 14 deletions
diff --git a/cmd/fpkg/test/configuration.nix b/cmd/fpkg/test/configuration.nix
index 2608fedd..ce74228a 100644
--- a/cmd/fpkg/test/configuration.nix
+++ b/cmd/fpkg/test/configuration.nix
@@ -50,9 +50,9 @@
];
};
- environment.fortify = {
+ environment.hakurei = {
enable = true;
- stateDir = "/var/lib/fortify";
+ stateDir = "/var/lib/hakurei";
users.alice = 0;
extraHomeConfig = {
diff --git a/cmd/fpkg/test/default.nix b/cmd/fpkg/test/default.nix
index c0a22486..dcd2cc66 100644
--- a/cmd/fpkg/test/default.nix
+++ b/cmd/fpkg/test/default.nix
@@ -18,7 +18,7 @@ nixosTest {
imports = [
./configuration.nix
- self.nixosModules.fortify
+ self.nixosModules.hakurei
self.inputs.home-manager.nixosModules.home-manager
];
};
diff --git a/cmd/fpkg/test/test.py b/cmd/fpkg/test/test.py
index 641062f2..9b9dfc16 100644
--- a/cmd/fpkg/test/test.py
+++ b/cmd/fpkg/test/test.py
@@ -47,22 +47,22 @@ def wait_for_window(pattern):
def collect_state_ui(name):
- swaymsg(f"exec fortify ps > '/tmp/{name}.ps'")
+ swaymsg(f"exec hakurei ps > '/tmp/{name}.ps'")
machine.copy_from_vm(f"/tmp/{name}.ps", "")
- swaymsg(f"exec fortify --json ps > '/tmp/{name}.json'")
+ swaymsg(f"exec hakurei --json ps > '/tmp/{name}.json'")
machine.copy_from_vm(f"/tmp/{name}.json", "")
machine.screenshot(name)
def check_state(name, enablements):
- instances = json.loads(machine.succeed("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 fortify --json ps"))
+ instances = json.loads(machine.succeed("sudo -u alice -i XDG_RUNTIME_DIR=/run/user/1000 hakurei --json ps"))
if len(instances) != 1:
raise Exception(f"unexpected state length {len(instances)}")
instance = next(iter(instances.values()))
config = instance['config']
- if len(config['args']) != 1 or not (config['args'][0].startswith("/nix/store/")) or f"fortify-{name}-" not in (config['args'][0]):
+ if len(config['args']) != 1 or not (config['args'][0].startswith("/nix/store/")) or f"hakurei-{name}-" not in (config['args'][0]):
raise Exception(f"unexpected args {instance['config']['args']}")
if config['enablements'] != enablements:
@@ -72,15 +72,15 @@ def check_state(name, enablements):
start_all()
machine.wait_for_unit("multi-user.target")
-# To check fortify's version:
-print(machine.succeed("sudo -u alice -i fortify version"))
+# To check hakurei's version:
+print(machine.succeed("sudo -u alice -i hakurei version"))
# Wait for Sway to complete startup:
machine.wait_for_file("/run/user/1000/wayland-1")
machine.wait_for_file("/tmp/sway-ipc.sock")
# Prepare fpkg directory:
-machine.succeed("install -dm 0700 -o alice -g users /var/lib/fortify/1000")
+machine.succeed("install -dm 0700 -o alice -g users /var/lib/hakurei/1000")
# Install fpkg app:
swaymsg("exec fpkg -v install /etc/foot.pkg && touch /tmp/fpkg-install-done")
@@ -88,9 +88,9 @@ machine.wait_for_file("/tmp/fpkg-install-done")
# Start app (foot) with Wayland enablement:
swaymsg("exec fpkg -v start org.codeberg.dnkl.foot")
-wait_for_window("fortify@machine-foot")
+wait_for_window("hakurei@machine-foot")
machine.send_chars("clear; wayland-info && touch /tmp/success-client\n")
-machine.wait_for_file("/tmp/fortify.1000/tmpdir/2/success-client")
+machine.wait_for_file("/tmp/hakurei.1000/tmpdir/2/success-client")
collect_state_ui("app_wayland")
check_state("foot", 13)
# Verify acl on XDG_RUNTIME_DIR:
@@ -104,5 +104,5 @@ machine.wait_until_fails("getfacl --absolute-names --omit-header --numeric /run/
swaymsg("exit", succeed=False)
machine.wait_for_file("/tmp/sway-exit-ok")
-# Print fortify runDir contents:
-print(machine.succeed("find /run/user/1000/fortify")) \ No newline at end of file
+# Print hakurei runDir contents:
+print(machine.succeed("find /run/user/1000/hakurei")) \ No newline at end of file