2022-09-16 11:30:50 +00:00
|
|
|
import * as utils from 'dockest/test-helper';
|
2022-10-06 11:48:01 +00:00
|
|
|
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}`;
|
|
|
|
|
|
2022-10-06 11:48:01 +00:00
|
|
|
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
|
|
|
});
|
|
|
|
|
|
2022-10-06 11:48:01 +00:00
|
|
|
return res.json();
|
2022-09-16 11:30:50 +00:00
|
|
|
}
|