mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-07-06 17:13:24 -05:00
nixos/tests/friate: migrate to container test
This commit is contained in:
parent
25883c0434
commit
660ebbfb0d
1 changed files with 4 additions and 4 deletions
|
|
@ -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")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue