nixosTests.anki-sync-server: migrate to runTest

Part Of #386873
This commit is contained in:
Martin Weinelt 2025-03-13 23:24:58 +01:00
parent e045203e0e
commit 8e3f874502
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 62 additions and 66 deletions

View file

@ -167,7 +167,7 @@ in {
amazon-ssm-agent = runTest ./amazon-ssm-agent.nix;
amd-sev = runTest ./amd-sev.nix;
angie-api = runTest ./angie-api.nix;
anki-sync-server = handleTest ./anki-sync-server.nix {};
anki-sync-server = runTest ./anki-sync-server.nix;
anuko-time-tracker = handleTest ./anuko-time-tracker.nix {};
apcupsd = handleTest ./apcupsd.nix {};
apfs = runTest ./apfs.nix;

View file

@ -1,6 +1,5 @@
import ./make-test-python.nix (
{ pkgs, ... }:
let
{ pkgs, ... }:
let
ankiSyncTest = pkgs.writeScript "anki-sync-test.py" ''
#!${pkgs.python3}/bin/python
@ -35,16 +34,14 @@ import ./make-test-python.nix (
# and check we got it?
'';
testPasswordFile = pkgs.writeText "anki-password" "passfilepassword";
in
{
in
{
name = "anki-sync-server";
meta = with pkgs.lib.maintainers; {
maintainers = [ martinetd ];
};
nodes.machine =
{ pkgs, ... }:
{
nodes.machine = {
services.anki-sync-server = {
enable = true;
users = [
@ -71,5 +68,4 @@ import ./make-test-python.nix (
with subtest("Can sync"):
machine.succeed("${ankiSyncTest}")
'';
}
)
}