Skip to content

Commit

Permalink
Merge pull request #436 from Arquisoft/luis2
Browse files Browse the repository at this point in the history
Arreglos
  • Loading branch information
uo283055 authored May 1, 2024
2 parents 7f726af + 65f46f5 commit 807c503
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 10 deletions.
2 changes: 0 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,6 @@ services:
environment:
MONGODB_URI: mongodb+srv://aswuser:[email protected]/rankingdb?retryWrites=true&w=majority&appName=wiq06b


questiongeneratorservice:
container_name: questiongeneratorservice-${teamname:-wiq_es06b}
image: ghcr.io/arquisoft/wiq_es6b/questiongeneratorservice:latest
Expand All @@ -110,7 +109,6 @@ services:
environment:
MONGODB_URI: mongodb+srv://aswuser:[email protected]/questiongeneratordb?retryWrites=true&w=majority&appName=wiq06b


gatewayservice:
container_name: gatewayservice-${teamname:-wiq_es06b}
image: ghcr.io/arquisoft/wiq_es6b/gatewayservice:latest
Expand Down
6 changes: 5 additions & 1 deletion docs/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,10 @@ include::src/11_technical_risks.adoc[]

<<<<
// 12. Glossary
include::src/12_glossary.adoc[]
include::src/12_testing.adoc[]

<<<<
// 13. Glossary
include::src/13_glossary.adoc[]


4 changes: 2 additions & 2 deletions docs/src/12_testing.adoc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ifndef::imagesdir[:imagesdir: ../images]

[[section-glossary]]
[[section-testing]]
== Testing
Se llevarán a cabo pruebas unitarias, E2E y de carga para garantizar la ejecución correcta de todas las funcionalidades de la aplicación.

Expand Down Expand Up @@ -30,7 +30,7 @@ Para lograr esto, seguimos los principios FIRST:
|===

=== E2E. Tests de integración
Buscaremos garantizar que la aplicación sea fácil de usar para proporcionar una experiencia satisfactoria al usuario. Nos centraremos en verificar diversas funcionalidades, desde la jugabilidad hasta acciones como el registro, inicio de sesión y cambios en los ajustes. Simularemos interacciones que haría un usuario real para asegurar que la aplicación sea intuitiva y funcione correctamente.
Buscaremos garantizar que la aplicación sea fácil de usar para proporcionar una experiencia satisfactoria al usuario. Nos centraremos en verificar diversas funcionalidades, desde la jugabilidad hasta acciones como el registro e inicio de sesión. Simularemos interacciones que haría un usuario real para asegurar que la aplicación sea intuitiva y funcione correctamente.

=== Tests de carga
Hemos realizado pruebas con 120 usuarios llegado a una tasa de 2 usuarios por segundo. La prueba consiste en logearse, jugar una partida, consultar todos los apartados de la barra de navegación, cambiar los ajustes bajando el numero de preguntas y volviendo a jugar una partida.
Expand Down
2 changes: 2 additions & 0 deletions gatewayservice/.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
PROD_URL_3000=http://51.142.17.139/:3000
PROD_URL_8000=http://51.142.17.139/:8000
16 changes: 11 additions & 5 deletions gatewayservice/gateway-service.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ const swaggerUi = require('swagger-ui-express');
const fs = require("fs")
const YAML = require('yaml')

require('dotenv').config();

const app = express();
app.disable("x-powered-by");
const port = 8000;
Expand All @@ -19,11 +21,15 @@ const genQuestServiceUrl = process.env.GEN_SERVICE_URL || 'http://localhost:8003
const rankingServiceUrl = process.env.RANK_SERVICE_URL || 'http://localhost:8004';
const questiongeneratorserviceUrl = process.env.QTEST_SERVICE_URL || 'http://localhost:8007';

const clientUrl = process.env.CLIENT_URL || 'http://localhost:3000';
const serverUrl = process.env.CLIENT_URL || 'http://localhost:8000';
let corsOptions = {
origin: [ clientUrl, serverUrl ]
};
const devUrl3000 = process.env.DEV_URL_3000 || 'http://localhost:3000';
const devUrl8000 = process.env.DEV_URL_8000 || 'http://localhost:8000';
const prodUrl3000 = process.env.PROD_URL_3000;
const prodUrl8000 = process.env.PROD_URL_8000;

const corsOptions = {
origin: [ devUrl3000, devUrl8000, prodUrl3000, prodUrl8000 ],
optionsSuccessStatus: 200
}

app.use(cors(corsOptions));
app.use(express.json());
Expand Down
12 changes: 12 additions & 0 deletions gatewayservice/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gatewayservice/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
"dependencies": {
"axios": "^1.6.5",
"cors": "^2.8.5",
"dotenv": "^16.4.5",
"express": "^4.18.2",
"express-openapi": "^12.1.3",
"express-prom-bundle": "^7.0.0",
Expand Down

0 comments on commit 807c503

Please sign in to comment.