aboutsummaryrefslogtreecommitdiff
path: root/src/zenhttp/httpclient_test.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2026-03-27 09:51:29 +0100
committerGitHub Enterprise <[email protected]>2026-03-27 09:51:29 +0100
commite811745e5c37dd38a8fb9f4bc2892525401eabbd (patch)
tree63896cabc0eb895887dc8247bb573f0dfd696afa /src/zenhttp/httpclient_test.cpp
parenthub async provision/deprovision/hibernate/wake (#891) (diff)
downloadzen-e811745e5c37dd38a8fb9f4bc2892525401eabbd.tar.xz
zen-e811745e5c37dd38a8fb9f4bc2892525401eabbd.zip
hub instance state refactor (#892)
- Improvement: Provisioning a hibernated instance now automatically wakes it instead of requiring an explicit wake call first - Improvement: Deprovisioning now accepts instances in Crashed or Hibernated states, not just Provisioned - Improvement: Added `--consul-health-interval-seconds` and `--consul-deregister-after-seconds` options to control Consul health check behavior (defaults: 10s and 30s) - Improvement: Consul registration now occurs when provisioning starts; health check intervals are applied once provisioning completes
Diffstat (limited to 'src/zenhttp/httpclient_test.cpp')
-rw-r--r--src/zenhttp/httpclient_test.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/zenhttp/httpclient_test.cpp b/src/zenhttp/httpclient_test.cpp
index 7a657c464..af653cbb2 100644
--- a/src/zenhttp/httpclient_test.cpp
+++ b/src/zenhttp/httpclient_test.cpp
@@ -492,6 +492,17 @@ TEST_CASE("httpclient.put")
CHECK_EQ(Resp.StatusCode, HttpResponseCode::Created);
CHECK_EQ(Resp.AsText(), "resource created");
}
+
+ SUBCASE("PUT with payload and query parameters")
+ {
+ const char* Payload = "put payload data";
+ IoBuffer Buf(IoBuffer::Clone, Payload, strlen(Payload));
+ Buf.SetContentType(ZenContentType::kText);
+
+ HttpClient::Response Resp = Client.Put("/api/test/echo/uri", Buf, {}, {{"key", "value"}});
+ CHECK(Resp.IsSuccess());
+ CHECK_EQ(Resp.AsText(), "echo/uri\nkey=value");
+ }
}
TEST_CASE("httpclient.upload")