mob next [ci-skip] [ci skip] [skip ci]
lastFile:tests/lib.nix
This commit is contained in:
23
tests/tests/think-gtcm.nix
Normal file
23
tests/tests/think-gtcm.nix
Normal file
@@ -0,0 +1,23 @@
|
||||
(import ../lib.nix) {
|
||||
name = "think-gtcm";
|
||||
nodes = {
|
||||
# `self` here is set by using specialArgs in `lib.nix`
|
||||
node1 =
|
||||
{ self, pkgs, ... }:
|
||||
{
|
||||
nixpkgs.overlays = [ self.overlays.packagesOverlay ];
|
||||
imports = [ self.nixosModules.think-gtcm ];
|
||||
services.think-greaterchiangmai = {
|
||||
enable = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
# This is the test code that will check if our service is running correctly:
|
||||
testScript = ''
|
||||
start_all()
|
||||
|
||||
node1.wait_for_unit("phpfpm-think-greaterchiangmai")
|
||||
node1.wait_for_open_port(80)
|
||||
output = node1.succeed("curl localhost")
|
||||
'';
|
||||
}
|
||||
Reference in New Issue
Block a user