nixos/tests/cfssl: Use curl --fail

This commit is contained in:
Scott Worley 2020-09-16 09:03:28 -07:00 committed by Frederik Rietdijk
parent 8adaa71b52
commit ad96a2e52b

View File

@ -38,7 +38,7 @@ import ./make-test-python.nix ({ pkgs, ...} : {
testScript =
let
cfsslrequest = with pkgs; writeScript "cfsslrequest" ''
curl -X POST -H "Content-Type: application/json" -d @${csr} \
curl -f -X POST -H "Content-Type: application/json" -d @${csr} \
http://localhost:8888/api/v1/cfssl/newkey | ${cfssl}/bin/cfssljson /tmp/certificate
'';
csr = pkgs.writeText "csr.json" (builtins.toJSON {