Skip to content

Commit

Permalink
test: pull exposr from ghcr.io
Browse files Browse the repository at this point in the history
  • Loading branch information
fredriklindberg committed Jul 27, 2023
1 parent 0eadab5 commit a56d460
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/e2e/e2e-utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import child_process from 'child_process';
import ssh from 'ssh2';
import net from 'net';
import crypto from 'crypto';
import { EXPOSR_CONTAINER } from '../env.js';

const defaultBaseApi = "http://localhost:8080";

Expand Down Expand Up @@ -104,7 +105,7 @@ export const startExposr = (args, port) => {
const obj = child_process.spawn("docker", [
"run", "--rm", "-t", "--add-host", "host.docker.internal:host-gateway",
"--name", name,
"exposr/exposr:latest",
EXPOSR_CONTAINER,
"--non-interactive",
"-s", `http://host.docker.internal:${port}`,
].concat(args), {detached: true});
Expand Down
3 changes: 2 additions & 1 deletion test/e2e/test_cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import crypto from 'crypto';
import assert from 'assert/strict';
import { setTimeout } from 'timers/promises';
import { createAccount, createEchoServer, getAuthToken, getTunnel, putTunnel } from './e2e-utils.js';
import { EXPOSR_CONTAINER } from '../env.js';

const startExposrd = (name = "", network, args = [], dockerargs = []) => {
const obj = child_process.spawn("docker", [
Expand Down Expand Up @@ -39,7 +40,7 @@ export const startExposr = (server, network, args) => {
"run", "--rm", "-t", "--add-host", "host.docker.internal:host-gateway",
"--name", name,
"--net", network,
"exposr/exposr:latest",
EXPOSR_CONTAINER,
"--non-interactive",
"-s", server,
].concat(args), {detached: true});
Expand Down
3 changes: 2 additions & 1 deletion test/env.js
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
export const REDIS_URL = process.env.TEST_REDIS_URL || 'redis://localhost:6379';
export const PGSQL_URL = process.env.TEST_PGSQL_URL || 'postgres://postgres:password@localhost:5432/exposr';
export const PGSQL_URL = process.env.TEST_PGSQL_URL || 'postgres://postgres:password@localhost:5432/exposr';
export const EXPOSR_CONTAINER = "ghcr.io/exposr/exposr:latest";

0 comments on commit a56d460

Please sign in to comment.