diff options
author | Florian Dold <florian@dold.me> | 2023-08-29 09:02:16 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-29 09:03:19 +0200 |
commit | b13bd85215ad64e7a2764ac7e7fee5945ffa1c07 (patch) | |
tree | 70643c7e76baeb9f61857add603dc381b6f03766 /packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts | |
parent | 8941f29cb457f86235b73f125e77a88cb762f353 (diff) | |
download | wallet-core-b13bd85215ad64e7a2764ac7e7fee5945ffa1c07.tar.xz |
taler-harness: remove axios usage, renovate some tests
Diffstat (limited to 'packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts')
-rw-r--r-- | packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts index 534b35278..18a09c76b 100644 --- a/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts +++ b/packages/taler-harness/src/integrationtests/test-merchant-instances-urls.ts @@ -18,8 +18,6 @@ * Imports. */ import { Duration } from "@gnu-taler/taler-util"; -import axiosImp from "axios"; -const axios = axiosImp.default; import { ExchangeService, GlobalTestState, @@ -27,14 +25,14 @@ import { MerchantService, setupDb, getPayto, + harnessHttpLib, } from "../harness/harness.js"; +import { createPlatformHttpLib } from "@gnu-taler/taler-util/http"; /** * Do basic checks on instance management and authentication. */ export async function runMerchantInstancesUrlsTest(t: GlobalTestState) { - // Set up test environment - const db = await setupDb(t); const exchange = ExchangeService.create(t, { @@ -111,11 +109,10 @@ export async function runMerchantInstancesUrlsTest(t: GlobalTestState) { }); async function check(url: string, token: string, expectedStatus: number) { - const resp = await axios.get(url, { + const resp = await harnessHttpLib.fetch(url, { headers: { Authorization: `Bearer ${token}`, }, - validateStatus: () => true, }); console.log( `checking ${url}, expected ${expectedStatus}, got ${resp.status}`, |