nixos/tests/dolibarr: use -X GET instead -X POST to test for redirection

Previously, we were POST-ing the homepage to test for redirection, this is wrong.

We are supposed to GET-ing it.

This is fixed.
This commit is contained in:
Raito Bezarius 2023-08-26 13:44:19 +02:00
parent ec0c7f2799
commit 7207b25099

View File

@ -50,7 +50,7 @@ import ./make-test-python.nix ({ pkgs, lib, ... }: {
# Now, we have installed the machine, let's verify we still have the right configuration.
assert 'nixos' in machine.succeed("cat /var/lib/dolibarr/conf.php")
# We do not want any redirect now as we have installed the machine.
machine.succeed('curl -f -X POST http://localhost')
machine.succeed('curl -f -X GET http://localhost')
# Test authentication to the webservice.
parser = TokenParser()
parser.feed(machine.succeed('curl -f -X GET http://localhost/index.php?mainmenu=login&username=root'))