diff options
| author | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-22 21:09:14 +0200 |
|---|---|---|
| committer | Benedikt Peetz <benedikt.peetz@b-peetz.de> | 2026-08-22 21:09:14 +0200 |
| commit | 2507bb0a7713d7d534a18812e2ed4247cff43325 (patch) | |
| tree | 6596ae9d9904b9caa19f69db866cdd5aaedfd1ac /tests | |
| parent | feat: Finalize design for fish-shell integration (diff) | |
| download | atuin-2507bb0a7713d7d534a18812e2ed4247cff43325.zip | |
fix(nix): Update all references and switch build to crane
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/basic.nix | 35 |
1 files changed, 15 insertions, 20 deletions
diff --git a/tests/basic.nix b/tests/basic.nix index 1ee00071..5ed8ca6c 100644 --- a/tests/basic.nix +++ b/tests/basic.nix @@ -13,14 +13,12 @@ imports = [ ./common/acme/server.nix ./common/dns/client.nix - ../nix/module.nix ]; }; name_server = {nodes, ...}: { imports = [ ./common/acme/client.nix ./common/dns/server.nix - ../nix/module.nix ]; vhack.dns.zones = { @@ -45,7 +43,6 @@ turtleCfg = config.services.turtle; in { imports = [ - ../nix/module.nix ./common/acme/client.nix ./common/dns/client.nix ]; @@ -91,7 +88,6 @@ ... }: { imports = [ - ../nix/module.nix ./common/acme/client.nix ./common/dns/client.nix ]; @@ -104,7 +100,6 @@ ... }: { imports = [ - ../nix/module.nix ./common/acme/client.nix ./common/dns/client.nix ]; @@ -115,8 +110,8 @@ testScript = {nodes, ...}: let mkSyncConfig = pkgs.writeShellScript "write-turtle-sync-config" '' - mkdir --parents ~/.config/atuin/ - cat << EOF > ~/.config/atuin/config.toml + mkdir --parents ~/.config/turtle/ + cat << EOF > ~/.config/turtle/config.toml [sync] address = "https://turtle-sync.server" @@ -134,10 +129,10 @@ local id local status local escaped_command="$(printf '%q ' "$@")" - id="$(atuin history start -- "$escaped_command")" + id="$(turtle history start -- "$escaped_command")" "$@" status=$? - atuin history end --exit $status "$id" + turtle history end --exit $status "$id" return $status } # SPDX-SnippetEnd @@ -160,12 +155,12 @@ for client in [client1, client2]: client.succeed("${mkSyncConfig}") - with subtest("Start atuin daemon"): + with subtest("Start turtle daemon"): for client in [client1, client2]: - client.succeed("systemd-run atuin daemon start") + client.succeed("systemd-run turtle-daemon start") for client in [client1, client2]: - client.wait_until_succeeds("atuin daemon status") + client.wait_until_succeeds("turtle daemon status") with subtest("Can generate shell history"): client1.succeed("${runCommandAndRecordInTurtle} echo hi - client 1") @@ -173,12 +168,12 @@ with subtest("Can sync"): for client in [client1, client2]: - client.succeed("atuin sync perform --force") - client1.succeed("atuin sync perform --force") + client.succeed("turtle sync perform") + client1.succeed("turtle sync perform") with subtest("Have correct tasks"): - hist1 = client1.succeed("atuin history list --format '{command}'").strip().split('\n') - hist2 = client2.succeed("atuin history list --format '{command}'").strip().split('\n') + hist1 = client1.succeed("turtle history list --cmd-only").strip().split('\n') + hist2 = client2.succeed("turtle history list --cmd-only").strip().split('\n') hist1.sort() hist2.sort() @@ -196,11 +191,11 @@ client2.succeed("${runCommandAndRecordInTurtle} echo second try - client 2") for client in [client1, client2]: - client.succeed("atuin sync perform --force") - client1.succeed("atuin sync perform --force") + client.succeed("turtle sync perform") + client1.succeed("turtle sync perform") - hist1 = client1.succeed("atuin history list --format '{command}'").strip().split('\n') - hist2 = client2.succeed("atuin history list --format '{command}'").strip().split('\n') + hist1 = client1.succeed("turtle history list --cmd-only").strip().split('\n') + hist2 = client2.succeed("turtle history list --cmd-only").strip().split('\n') hist1.sort() hist2.sort() |
