mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-06-05 21:03:40 +00:00
nixos/tests/friate: migrate to container test
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
name = "frigate";
|
||||
meta = { inherit (pkgs.frigate.meta) maintainers; };
|
||||
|
||||
nodes = {
|
||||
containers = {
|
||||
machine = {
|
||||
services.frigate = {
|
||||
enable = true;
|
||||
@@ -67,13 +67,13 @@
|
||||
password = machine.execute("journalctl -u frigate.service -o cat | grep -oP '([a-f0-9]{32})'")[1]
|
||||
|
||||
# login and store session
|
||||
machine.log(machine.succeed(f"http --check-status --session=frigate post http://localhost/api/login user=admin password={password}"))
|
||||
machine.log(machine.succeed(f"http --ignore-stdin --check-status --session=frigate post http://localhost/api/login user=admin password={password}"))
|
||||
|
||||
# make authenticated api request
|
||||
machine.log(machine.succeed("http --check-status --session=frigate get http://localhost/api/version"))
|
||||
machine.log(machine.succeed("http --ignore-stdin --check-status --session=frigate get http://localhost/api/version"))
|
||||
|
||||
# make unauthenticated api request
|
||||
machine.log(machine.succeed("http --check-status get http://localhost:5000/api/version"))
|
||||
machine.log(machine.succeed("http --ignore-stdin --check-status get http://localhost:5000/api/version"))
|
||||
|
||||
# wait for a recording to appear
|
||||
machine.wait_for_file("/var/cache/frigate/test@*.mp4")
|
||||
|
||||
Reference in New Issue
Block a user