integration tests: check that TWG base URLs look well-formed

This commit is contained in:
Florian Dold 2021-08-04 12:40:49 +02:00
parent f92cbdbf47
commit a8e5b95682
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B

View File

@ -22,7 +22,6 @@ import {
SandboxUserBundle,
NexusUserBundle,
launchLibeufinServices,
LibeufinSandboxApi,
LibeufinNexusApi,
} from "./libeufin";
@ -52,6 +51,12 @@ export async function runLibeufinApiFacadeTest(t: GlobalTestState) {
);
// check that original facade shows up.
t.assertTrue(resp.data["facades"][0]["name"] == user01nexus.twgReq["name"]);
const twgBaseUrl: string = resp.data["facades"][0]["twgBaseUrl"];
t.assertTrue(typeof twgBaseUrl === "string");
t.assertTrue(twgBaseUrl.startsWith("http://"));
t.assertTrue(twgBaseUrl.endsWith("/"));
// delete it.
resp = await LibeufinNexusApi.deleteFacade(
libeufinServices.libeufinNexus,