From ed55403f95ef8cc657bf9e4d6dd2c29c72400ca0 Mon Sep 17 00:00:00 2001 From: owenpearson Date: Mon, 21 Sep 2026 17:32:13 +0100 Subject: [PATCH] UTS: drive the RSA4b renewal test off a normal request instead of /time The renewal-msgpack test drove token renewal through /time, which requires no auth and so cannot exercise renewal-on-request. Reworks it to use a normal authenticated request, matching the RSC10/request-retried-after-renewal-0 template. Closes #530 Co-Authored-By: Claude Opus 4.8 --- uts/rest/unit/auth/token_renewal.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/uts/rest/unit/auth/token_renewal.md b/uts/rest/unit/auth/token_renewal.md index fabd1d336..02ad77f9d 100644 --- a/uts/rest/unit/auth/token_renewal.md +++ b/uts/rest/unit/auth/token_renewal.md @@ -562,9 +562,12 @@ mock_http = MockHttpClient( headers: { "Content-Type": "application/x-msgpack" } ) ELSE: - # Retry succeeds — also returned as msgpack + # Retry succeeds — channel status returned as msgpack req.respond_with(200, - body: msgpack_encode([1234567890000]), + body: msgpack_encode({ + "channelId": "test", + "status": {"isActive": true, "occupancy": {"metrics": {"connections": 0}}} + }), headers: { "Content-Type": "application/x-msgpack" } ) } @@ -581,7 +584,7 @@ client = Rest( ### Test Steps ```pseudo -result = AWAIT client.time() +result = AWAIT client.channels.get("test").status() ``` ### Assertions @@ -593,5 +596,5 @@ ASSERT callback_count == 2 ASSERT request_count == 2 # Result is successful -ASSERT result == 1234567890000 +ASSERT result IS ChannelDetails ```