console/integration-tests/testkit/external-composition.ts

18 lines
464 B
TypeScript
Raw Normal View History

import { getServiceHost } from './utils';
2022-09-16 11:30:50 +00:00
export const serviceName = 'external_composition';
export const servicePort = 3012;
2022-09-16 11:30:50 +00:00
export async function history(): Promise<string[]> {
const dockerAddress = await getServiceHost(serviceName, servicePort);
const res = await fetch(`http://${dockerAddress}/_history`, {
method: 'GET',
headers: {
accept: 'application/json',
'content-type': 'application/json',
},
2022-09-16 11:30:50 +00:00
});
return res.json();
2022-09-16 11:30:50 +00:00
}