Skip to content

Commit

Permalink
feat: add log
Browse files Browse the repository at this point in the history
  • Loading branch information
alexey-yarmosh committed Apr 12, 2024
1 parent 1181262 commit 6e6d72e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 1 deletion.
14 changes: 14 additions & 0 deletions test/e2e/docker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,18 @@ class DockerManager {
}

// docker run -e API_HOST=ws://host.docker.internal:80 --name globalping-probe-e2e globalping-probe-e2e
console.log({
Image: 'globalping-probe-e2e',
name: 'globalping-probe-e2e',
Env: [
`API_HOST=${apiHost}`,
],
HostConfig: {
NetworkMode: networkMode,
ExtraHosts: [ 'host.docker.internal:host-gateway' ],
},
});

const container = await this.docker.createContainer({
Image: 'globalping-probe-e2e',
name: 'globalping-probe-e2e',
Expand Down Expand Up @@ -122,6 +134,8 @@ class DockerManager {
private async isLinuxHost (): Promise<boolean> {
const versionInfo = await this.docker.version();
const platformName = versionInfo.Platform.Name.toLowerCase();
console.log('versionInfo.Platform');
console.log(versionInfo.Platform);
return platformName.includes('engine');
}

Expand Down
4 changes: 3 additions & 1 deletion test/e2e/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,9 @@ export const waitProbeToConnect = async () => {
for (;;) {
try {
responses = await Promise.all(_.times(processes * 2, (() => got<any>('http://localhost:80/v1/probes', { responseType: 'json' }))));
} catch (err) {
} catch (err: any) {
console.log(err);
console.log(err.message);
logger.info((err as RequestError).code);
await setTimeout(1000);
continue;
Expand Down

0 comments on commit 6e6d72e

Please sign in to comment.