diff options
author | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2020-01-26 12:32:47 +0100 |
---|---|---|
committer | Jacek Galowicz <jacek.galowicz@cyberus-technology.de> | 2020-01-26 17:11:59 +0100 |
commit | 4df1df986d4a4bb3a72555ba59e1828ce19b594b (patch) | |
tree | bd55c05b1a6e13f7b0006835cd737c18a00d77b8 | |
parent | f63ef280df8f2ab32ba92e9f5a8af74320ced88b (diff) | |
download | nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar.gz nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar.bz2 nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar.lz nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar.xz nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.tar.zst nixpkgs-4df1df986d4a4bb3a72555ba59e1828ce19b594b.zip |
nixosTests.limesurvey: Port to python
-rw-r--r-- | nixos/tests/limesurvey.nix | 29 |
1 files changed, 17 insertions, 12 deletions
diff --git a/nixos/tests/limesurvey.nix b/nixos/tests/limesurvey.nix index ad66ada106b..7228fcb8331 100644 --- a/nixos/tests/limesurvey.nix +++ b/nixos/tests/limesurvey.nix @@ -1,21 +1,26 @@ -import ./make-test.nix ({ pkgs, ... }: { +import ./make-test-python.nix ({ pkgs, ... }: { name = "limesurvey"; meta.maintainers = [ pkgs.stdenv.lib.maintainers.aanderse ]; - machine = - { ... }: - { services.limesurvey.enable = true; - services.limesurvey.virtualHost.hostName = "example.local"; - services.limesurvey.virtualHost.adminAddr = "root@example.local"; - - # limesurvey won't work without a dot in the hostname - networking.hosts."127.0.0.1" = [ "example.local" ]; + machine = { ... }: { + services.limesurvey = { + enable = true; + virtualHost = { + hostName = "example.local"; + adminAddr = "root@example.local"; + }; }; + # limesurvey won't work without a dot in the hostname + networking.hosts."127.0.0.1" = [ "example.local" ]; + }; + testScript = '' - startAll; + start_all() - $machine->waitForUnit('phpfpm-limesurvey.service'); - $machine->succeed('curl http://example.local/') =~ /The following surveys are available/ or die; + machine.wait_for_unit("phpfpm-limesurvey.service") + assert "The following surveys are available" in machine.succeed( + "curl http://example.local/" + ) ''; }) |