generated from Arquisoft/wiq_0
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #315 from Arquisoft/test
Problema e2e
- Loading branch information
Showing
4 changed files
with
57 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
#!/bin/bash | ||
|
||
# Detener todos los contenedores Docker | ||
docker stop $(docker ps -aq) | ||
# Navegar a la carpeta e2e en tu directorio home | ||
cd ~/e2e | ||
|
||
# Vaciar la carpeta e2e | ||
rm -rf * | ||
|
||
# Clonar el repositorio | ||
git clone https://github.com/Arquisoft/wiq_es05c.git | ||
cd wiq_es05c | ||
|
||
# Configurar Node.js | ||
nvm install 21 | ||
nvm use 21 | ||
|
||
# Instalar dependencias y construir la aplicación web | ||
npm --prefix users/authservice install | ||
npm --prefix users/userservice install | ||
npm --prefix gatewayservice install | ||
npm --prefix historyservice install | ||
npm --prefix questionservice install | ||
npm --prefix roomservice install | ||
npm --prefix webapp install | ||
npm --prefix webapp run build | ||
|
||
# Ejecutar pruebas e2e | ||
xvfb-run --auto-servernum npm --prefix webapp run test:e2e | ||
|
||
# Capturar el estado de salida de las pruebas | ||
TEST_STATUS=$? | ||
|
||
# Si las pruebas fallaron, reiniciar todos los contenedores Docker y imprimir un mensaje | ||
if [ $TEST_STATUS -ne 0 ]; then | ||
echo "Fallaron los tests" | ||
docker start $(docker ps -aq) | ||
fi | ||
|
||
# Salir con el estado de salida de las pruebas | ||
exit $TEST_STATUS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters