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

20 lines
536 B
TypeScript
Raw Normal View History

2022-09-16 11:30:50 +00:00
import * as utils from 'dockest/test-helper';
import { fetch } from '@whatwg-node/fetch';
2022-09-16 11:30:50 +00:00
const port = 3012;
export const container = 'external_composition';
export const address = utils.getServiceAddress(container, port);
export const dockerAddress = `${container}:${port}`;
export async function history(): Promise<string[]> {
const res = await fetch(`http://${address}/_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
}