From 7e729ac34d117eef9c8fe0f03d1994414add5c85 Mon Sep 17 00:00:00 2001 From: Savyasachee Jha Date: Fri, 2 Aug 2024 21:34:22 +0530 Subject: [PATCH] nixosTests.firefly-iii-data-importer: init --- nixos/tests/all-tests.nix | 1 + nixos/tests/firefly-iii-data-importer.nix | 27 +++++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 nixos/tests/firefly-iii-data-importer.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index ee004f3c9825..a9217b08648a 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -326,6 +326,7 @@ in { filesender = handleTest ./filesender.nix {}; filesystems-overlayfs = runTest ./filesystems-overlayfs.nix; firefly-iii = handleTest ./firefly-iii.nix {}; + firefly-iii-data-importer = handleTest ./firefly-iii-data-importer.nix {}; firefox = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox; }; firefox-beta = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-beta; }; firefox-devedition = handleTest ./firefox.nix { firefoxPackage = pkgs.firefox-devedition; }; diff --git a/nixos/tests/firefly-iii-data-importer.nix b/nixos/tests/firefly-iii-data-importer.nix new file mode 100644 index 000000000000..aba41576d797 --- /dev/null +++ b/nixos/tests/firefly-iii-data-importer.nix @@ -0,0 +1,27 @@ +import ./make-test-python.nix ( + { lib, ... }: + + { + name = "firefly-iii-data-importer"; + meta.maintainers = [ lib.maintainers.savyajha ]; + + nodes.dataImporter = + { ... }: + { + services.firefly-iii-data-importer = { + enable = true; + enableNginx = true; + settings = { + LOG_CHANNEL = "stdout"; + USE_CACHE = true; + }; + }; + }; + + testScript = '' + dataImporter.wait_for_unit("phpfpm-firefly-iii-data-importer.service") + dataImporter.wait_for_unit("nginx.service") + dataImporter.succeed("curl -fvvv -Ls http://localhost/token | grep 'Firefly III Data Import Tool'") + ''; + } +)