taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 1a7c417b7ad7ce1e3463de28b1658b152f64366c
parent 609b86c80ba012f2c5dc4a42ee2ef7e2dd8b4359
Author: Florian Dold <dold@taler.net>
Date:   Thu, 27 Aug 2026 16:03:03 +0200

taler-harness: test the /keys withdrawal filter

Diffstat:
Mpackages/taler-harness/src/integrationtests/test-exchange-keys-withdraw-filter.ts | 8++++++++
1 file changed, 8 insertions(+), 0 deletions(-)

diff --git a/packages/taler-harness/src/integrationtests/test-exchange-keys-withdraw-filter.ts b/packages/taler-harness/src/integrationtests/test-exchange-keys-withdraw-filter.ts @@ -41,6 +41,7 @@ interface FlatDenomination { interface KeysDownload { body: ExchangeKeysResponse; bodySize: number; + cacheControl: string | undefined; etag: string | undefined; } @@ -130,6 +131,7 @@ async function downloadKeys(url: string): Promise<KeysDownload> { return { body: codecForExchangeKeysResponse().decode(JSON.parse(bodyText)), bodySize: bodyText.length, + cacheControl: response.headers.get("cache-control") ?? undefined, etag: response.headers.get("etag") ?? undefined, }; } @@ -239,6 +241,8 @@ export async function runExchangeKeysWithdrawFilterTest( flattenDenominations(initialFiltered.body).length, ); t.assertTrue(initialFiltered.etag !== undefined); + t.assertTrue(initialFull.cacheControl?.includes("max-age=86400") ?? false); + t.assertDeepEqual(initialFiltered.cacheControl, "public,must-revalidate"); const notModified = await harnessHttpLib.fetch(filteredUrl, { headers: { "if-none-match": initialFiltered.etag }, @@ -264,6 +268,10 @@ export async function runExchangeKeysWithdrawFilterTest( headers: { "if-none-match": initialFiltered.etag }, }); t.assertDeepEqual(overlapFilteredResponse.status, 200); + t.assertDeepEqual( + overlapFilteredResponse.headers.get("cache-control"), + "public,must-revalidate", + ); const overlapBodyText = await overlapFilteredResponse.text(); const overlapFiltered = codecForExchangeKeysResponse().decode( JSON.parse(overlapBodyText),