Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move docker compose to test #47

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .eslintignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
dist
hapi.postgress.data
**/hapi.postgress.data
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ node_modules
.env
.env.test
.eslintcache
hapi.postgress.data
**/hapi.postgress.data

3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# .npmignore
node_modules
serve
serve
**/hapi.postgress.data
File renamed without changes.
File renamed without changes.
6 changes: 5 additions & 1 deletion tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,11 @@ async function waitForFhirApi (maxAttempts, currentAttempt = 1) {

async function setup () {
console.log('starting FHIR server...');
await compose.upAll({ cwd: path.join(__dirname), log: true });
await compose.upAll({
cwd: path.join(__dirname),
config: 'docker-compose.yml',
log: true
});
const result = await compose.ps({ cwd: path.join(__dirname) });

globalThis.services = result.data.services;
Expand Down
7 changes: 6 additions & 1 deletion tests/teardown.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@
* Project name: FUME-COMMUNITY
*/
import * as compose from 'docker-compose';
import path from 'path';

async function teardown () {
console.log('stopping FHIR server...');
await compose.stopMany(globalThis.services);
await compose.stop({
cwd: path.join(__dirname),
config: 'docker-compose.yml',
log: true
});

console.log('closing server');
globalThis.fumeServer.shutDown();
Expand Down