Skip to content

Commit

Permalink
Some docker compose fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Taepper committed Sep 3, 2024
1 parent 264b6d1 commit 8ee2d62
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ services:
image: ghcr.io/genspectrum/lapis:${LAPIS_TAG}
ports:
- "8080:8080"
command: "--silo.url=localhost:8081"
command: --silo.url=http://silo:8081
volumes:
- type: bind
source: ${TESTSET_DATA_FOLDER}/database_config.yaml
Expand Down
7 changes: 5 additions & 2 deletions vitest.setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ getTestsetDirectories().forEach((testsetDir) => {
afterAll(() => {
if (fs.existsSync(dockerComposeFile)) {
console.log(`Stopping Docker Compose for ${testsetDir}...`);
execSync(`docker-compose down`, { stdio: 'inherit' });
execSync(`docker compose down`, { stdio: 'inherit' });
}
});

Expand Down Expand Up @@ -72,13 +72,16 @@ getTestsetDirectories().forEach((testsetDir) => {
const response = await fetch(url, requestOptions);
if(testCase.expectedResponse && testCase.expectedResponse.fileName){
const responseFile = path.join(queriesDir, testCase.expectedResponse.fileName)
const expectedResponse = fs.readFileSync( responseFile, 'utf-8');
const expectedResponse = fs.readFileSync(responseFile, 'utf-8');
const actualResponseBuffer = await response.body.getReader().read();
const decoder = new TextDecoder('utf-8');
const actualResponse = decoder.decode(actualResponseBuffer.value);

expect(actualResponse).to.equal(expectedResponse);
}
if(testCase.expectedStatusCode){
expect(response.status).to.equal(testCase.expectedStatusCode);
}
});
});
});
Expand Down

0 comments on commit 8ee2d62

Please sign in to comment.