nixos/tests/syncthing: Use curl --fail

Changed files
+3 -3
nixos
+1 -1
nixos/tests/syncthing-relay.nix
···
machine.wait_for_open_port(12346)
out = machine.succeed(
-
"curl -sS http://localhost:12346/status | jq -r '.options.\"provided-by\"'"
+
"curl -sSf http://localhost:12346/status | jq -r '.options.\"provided-by\"'"
)
assert "nixos-test" in out
'';
+2 -2
nixos/tests/syncthing.nix
···
"xmllint --xpath 'string(configuration/gui/apikey)' %s/config.xml" % confdir
).strip()
oldConf = host.succeed(
-
"curl -Ss -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config" % APIKey
+
"curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config" % APIKey
)
conf = json.loads(oldConf)
conf["devices"].append({"deviceID": deviceID, "id": name})
···
)
newConf = json.dumps(conf)
host.succeed(
-
"curl -Ss -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config -d %s"
+
"curl -Ssf -H 'X-API-Key: %s' 127.0.0.1:8384/rest/system/config -d %s"
% (APIKey, shlex.quote(newConf))
)