Skip to content
Closed
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
6 changes: 4 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ services:
USER_SERVICE_URL: http://users:8001
QUESTION_SERVICE_URL: http://questions:8010
restart: always

llmservice:
container_name: llmservice-wichat_es1a
container_name: llmservice
image: ghcr.io/arquisoft/wichat_es1a/llm-service:latest
profiles: ["dev", "prod"]
build: ./llmservice
Expand All @@ -69,6 +69,8 @@ services:
environment:
REACT_APP_GEMINI_API_KEY: ${GEMINI_API_KEY}

restart: always

webapp:
container_name: webapp
image: ghcr.io/arquisoft/wichat_es1a/web-app:latest
Expand Down
2 changes: 1 addition & 1 deletion docs/src/12_glossary.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ For more information, check the arc42 documentation: https://docs.arc42.org/sect
|A user who registers in the application to play the various available quizzes.

|Picture Game
|A challenge with questions from various topics (animals, logos, flags). The goal is to answer as many questions correctly as possible within a limited time, the round ends after 5 questions.
|A challenge with questions from various topics (works of art, flags). The goal is to answer as many questions correctly as possible within a limited time, the round ends after 5 questions.

|===

Expand Down
15 changes: 6 additions & 9 deletions gatewayservice/__tests/gateway-service.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,15 +163,13 @@ describe('Gateway API Integration', () => {
expect(res.body).toHaveProperty('error');
});

test('GET /questions/random/:category/:n éxito', async () => {
axios.get.mockResolvedValueOnce({ data: [{ q: 1 }, { q: 2 }] });
const res = await request(app).get('/questions/random/geography/2?username=test');
test('GET /questions/random/:category/:n éxito', async () => { axios.get.mockResolvedValueOnce({ data: [{ q: 1 }, { q: 2 }] });
const res = await request(app).get('/questions/random/flags/2?username=test');
expect(res.statusCode).toBe(200);
expect(res.body).toEqual([{ q: 1 }, { q: 2 }]);
});
test('GET /questions/random/:category/:n error', async () => {
axios.get.mockRejectedValueOnce({ response: { status: 500, data: { error: 'fail' } }, message: 'fail' });
const res = await request(app).get('/questions/random/geography/2?username=test');
test('GET /questions/random/:category/:n error', async () => { axios.get.mockRejectedValueOnce({ response: { status: 500, data: { error: 'fail' } }, message: 'fail' });
const res = await request(app).get('/questions/random/flags/2?username=test');
expect(res.statusCode).toBe(500);
expect(res.body).toHaveProperty('error');
});
Expand Down Expand Up @@ -275,9 +273,8 @@ describe('Cobertura extra de ramas en endpoints de preguntas', () => {
expect(res.statusCode).toBe(500);
expect(res.body).toHaveProperty('error');
});
it('GET /questions/random/:category/:n error sin response ni message', async () => {
axios.get.mockRejectedValueOnce({});
const res = await request(app).get('/questions/random/geography/2?username=test');
it('GET /questions/random/:category/:n error sin response ni message', async () => { axios.get.mockRejectedValueOnce({});
const res = await request(app).get('/questions/random/flags/2?username=test');
expect(res.statusCode).toBe(500);
expect(res.body).toHaveProperty('error');
});
Expand Down
Loading
Loading