Skip to content

Commit

Permalink
chore: remove son unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanVerbner committed Jun 8, 2021
1 parent 74dbfcc commit e41f03e
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions test/e2e/jest-setup/docker.ts
Expand Up @@ -2,10 +2,8 @@
/* eslint-disable no-console */
import Docker from 'dockerode';
import { containerExec, imageExists, pullImageAsync } from 'dockerode-utils';
import path from 'path';

const CONTAINER_IMAGE = 'postgres:11.5-alpine';
const CONTAINER_TEMP_DIR = '/tmp';
const CONTAINER_NAME = 'mcs-test';

export const removePostgresContainer = async (): Promise<void> => {
Expand Down Expand Up @@ -46,18 +44,10 @@ export const setupPostgresContainer = async (

// Uncomment the following lines if you are going to populate the db with a snapshot

// await container.putArchive(path.join(__dirname, 'db-snapshot.tar'), {
// path: CONTAINER_TEMP_DIR,
// User: 'root'
// });
//
// Wait for the db service to be running (container started event is not enough)
await containerExec(container, [
'bash',
'-c',
`until psql -U ${user} -d ${database} -c "select 1" > /dev/null 2>&1 ; do sleep 1; done`
]);
//
// // Execute backup restore
// await containerExec(container, ['bash', '-c', `cat ${CONTAINER_TEMP_DIR}/db.bak | psql -U ${user} ${database}`]);
};

0 comments on commit e41f03e

Please sign in to comment.