console/integration-tests/testkit/external-composition.ts
Dotan Simha 34b80e9492
Drop dockest, refactor integration testkit, and run all integration tests in parallel (#883)
Co-authored-by: Kamil Kisiela <kamil.kisiela@gmail.com>
2022-12-28 10:37:23 +01:00

18 lines
508 B
TypeScript

import { fetch } from '@whatwg-node/fetch';
import { getServiceHost } from './utils';
export const serviceName = 'external_composition';
export const servicePort = 3012;
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',
},
});
return res.json();
}