From 2b0a46285b2e7800c172525c7a6839111a05afb6 Mon Sep 17 00:00:00 2001 From: Anton Mosich Date: Tue, 9 Sep 2025 23:51:16 +0200 Subject: [PATCH] tests/pimsync: init --- tests/modules/programs/pimsync/basic.nix | 39 ++++++++++++++++++++++ tests/modules/programs/pimsync/basic.scfg | 31 +++++++++++++++++ tests/modules/programs/pimsync/default.nix | 3 ++ 3 files changed, 73 insertions(+) create mode 100644 tests/modules/programs/pimsync/basic.nix create mode 100644 tests/modules/programs/pimsync/basic.scfg create mode 100644 tests/modules/programs/pimsync/default.nix diff --git a/tests/modules/programs/pimsync/basic.nix b/tests/modules/programs/pimsync/basic.nix new file mode 100644 index 000000000..2b9b7434c --- /dev/null +++ b/tests/modules/programs/pimsync/basic.nix @@ -0,0 +1,39 @@ +{ + accounts.calendar = { + accounts.caldav = { + pimsync.enable = true; + remote = { + passwordCommand = [ + "pass" + "caldav" + ]; + type = "caldav"; + url = "https://caldav.example.com"; + userName = "alice"; + }; + }; + accounts.http = { + pimsync.enable = true; + remote = { + type = "http"; + url = "https://example.com/calendar"; + }; + }; + basePath = ".local/state/calendar"; + }; + + programs.pimsync = { + enable = true; + settings = [ + { + name = "status_path"; + params = [ "/test/dir" ]; + } + ]; + }; + + nmt.script = '' + assertFileExists home-files/.config/pimsync/pimsync.conf + assertFileContent home-files/.config/pimsync/pimsync.conf ${./basic.scfg} + ''; +} diff --git a/tests/modules/programs/pimsync/basic.scfg b/tests/modules/programs/pimsync/basic.scfg new file mode 100644 index 000000000..e0f6bb22d --- /dev/null +++ b/tests/modules/programs/pimsync/basic.scfg @@ -0,0 +1,31 @@ +storage caldav-local { + fileext .ics + path /home/hm-user/.local/state/calendar/caldav + type vdir/icalendar +} +storage http-local { + fileext .ics + path /home/hm-user/.local/state/calendar/http + type vdir/icalendar +} +storage caldav-remote { + type caldav + url https://caldav.example.com + username alice + password { + cmd pass caldav + } +} +storage http-remote { + type webcal + url https://example.com/calendar +} +pair calendar-caldav { + storage_a caldav-local + storage_b caldav-remote +} +pair calendar-http { + storage_a http-local + storage_b http-remote +} +status_path /test/dir diff --git a/tests/modules/programs/pimsync/default.nix b/tests/modules/programs/pimsync/default.nix new file mode 100644 index 000000000..350b8ac8e --- /dev/null +++ b/tests/modules/programs/pimsync/default.nix @@ -0,0 +1,3 @@ +{ + pimsync-basic = ./basic.nix; +}