Skip to content

Commit

Permalink
fix(#39) make the test script testable on Mac OSX (#45)
Browse files Browse the repository at this point in the history
change the docker-compose script so that the working directory is created under the working directory
fix issues in the two test cases
  • Loading branch information
WoonchanCho authored Jul 19, 2021
1 parent c292726 commit a685624
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,7 @@ yarn.lock
# dotenv environment variables file
.env

.idea
.idea

# docker files created by the docker containers for testing
tmp
10 changes: 5 additions & 5 deletions dcm4chee-docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ services:
- "389"
env_file: dcm4chee-docker-compose.env
volumes:
- /tmp/dcm4chee-arc/ldap:/var/lib/ldap
- /tmp/dcm4chee-arc/slapd.d:/etc/ldap/slapd.d
- ./tmp/dcm4chee-arc/ldap:/var/lib/ldap
- ./tmp/dcm4chee-arc/slapd.d:/etc/ldap/slapd.d
db:
image: dcm4che/postgres-dcm4chee:10.0-13
logging:
Expand All @@ -22,7 +22,7 @@ services:
- "5432"
env_file: dcm4chee-docker-compose.env
volumes:
- /tmp/dcm4chee-arc/db:/var/lib/postgresql/data
- ./tmp/dcm4chee-arc/db:/var/lib/postgresql/data
arc:
image: dcm4che/dcm4chee-arc-psql:5.13.3
logging:
Expand All @@ -39,5 +39,5 @@ services:
- ldap
- db
volumes:
- /tmp/dcm4chee-arc/wildfly:/opt/wildfly/standalone
- /tmp/dcm4chee-arc/storage:/storage
- ./tmp/dcm4chee-arc/wildfly:/opt/wildfly/standalone
- ./tmp/dcm4chee-arc/storage:/storage
6 changes: 3 additions & 3 deletions test/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('dicomweb.api.DICOMwebClient', function() {
};

await dwc.storeInstances(options);
}, 10000);
}, 20000);

it('should find four studes', async function() {
const studies = await dwc.searchForStudies();
Expand Down Expand Up @@ -165,7 +165,7 @@ describe('dicomweb.api.DICOMwebClient', function() {
url,
requestHooks: [requestHook1Spy, requestHook2Spy]
});
const metadata = { url: metadataUrl, method: 'get' };
const metadata = { url: metadataUrl, method: 'get', headers: {} };
request.open('GET', metadata.url);
await dwc.retrieveInstanceMetadata({
studyInstanceUID: '999.999.3859744',
Expand All @@ -181,7 +181,7 @@ describe('dicomweb.api.DICOMwebClient', function() {
url,
requestHooks: [requestHook1Spy, requestHook2Spy]
});
const metadata = { url: metadataUrl, method: 'get' };
const metadata = { url: metadataUrl, method: 'get', headers: {} };
request.open('GET', metadata.url);
await dwc.retrieveInstanceMetadata({
studyInstanceUID: '999.999.3859744',
Expand Down

0 comments on commit a685624

Please sign in to comment.