Skip to content

Commit

Permalink
regresion
Browse files Browse the repository at this point in the history
  • Loading branch information
vtamara committed Mar 27, 2024
1 parent 98013d1 commit ee7c6db
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 26 deletions.
6 changes: 3 additions & 3 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/heb412_gen.git
revision: 54915abcbb7255f4399e44dcb76b05337dc0a212
revision: b6a704b8d17df5ed1994291590dbededa696ba96
branch: main
specs:
heb412_gen (2.2.0.beta4)
Expand All @@ -29,7 +29,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/mr519_gen.git
revision: db9aa814bfffe7a1a4636c65bda68eda7a3e3ecd
revision: 6a74a024cfa899b65209b19f00d56dcb8d812769
branch: main
specs:
mr519_gen (2.2.0.beta4)
Expand All @@ -38,7 +38,7 @@ GIT

GIT
remote: https://gitlab.com/pasosdeJesus/msip.git
revision: 306d12415001b3626cace575bb6c9eed006e3fef
revision: e4d7e01308d00ba28975125e2f40a013948eaf0e
branch: main
specs:
msip (2.2.0.beta5)
Expand Down
54 changes: 31 additions & 23 deletions bin/regresion.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ if (test -f "test/dummy/config/application.rb") then {
} else {
rutaap="./"
} fi;
echo "bin/regresion rutaap=$rutaap"
if (test -f $rutaap/.env) then {
dirac=`pwd`
cd $rutaap
Expand Down Expand Up @@ -36,45 +37,52 @@ if (test "$RUTA_RELATIVA" = "") then {
exit 1
} fi;

echo "== Prepara base"
if (test "$SALTAPREPARA" != "1") then {
echo "== Prepara base"

(cd $rutaap; ${RAILS} db:environment:set RAILS_ENV=test; RAILS_ENV=test ${RAILS} db:drop db:create db:setup db:seed msip:indices)
if (test "$?" != "0") then {
echo "No se pudo inicializar base de pruebas";
exit 1;
} fi;

echo "== Pruebas de regresión unitarias"
mkdir -p cobertura-unitarias/
rm -rf cobertura-unitarias/{*,.*}
CONFIG_HOSTS=www.example.com RUTA_RELATIVA=/ ${RAILS} test test/models test/controllers test/helpers
if (test "$?" != "0") then {
echo "No pasaron pruebas de regresión unitarias";
exit 1;
(cd $rutaap; ${RAILS} db:environment:set RAILS_ENV=test; RAILS_ENV=test ${RAILS} db:drop db:create db:setup db:seed msip:indices)
if (test "$?" != "0") then {
echo "No se pudo inicializar base de pruebas";
exit 1;
} fi;
} fi;


if (test -d test/integration) then {
CONFIG_HOSTS=www.example.com RUTA_RELATIVA=/ bin/rails test `find test/integration -name "*rb" -type f`
if (test "$SALTAUNITARIAS" != "1") then {
echo "== Pruebas de regresión unitarias"
mkdir -p cobertura-unitarias/
rm -rf cobertura-unitarias/{*,.*}
CONFIG_HOSTS=www.example.com RUTA_RELATIVA=/ ${RAILS} test test/models test/controllers test/helpers
if (test "$?" != "0") then {
echo "No pasaron pruebas de integración";
echo "No pasaron pruebas de regresión unitarias";
exit 1;
} fi;


if (test -d test/integration -a "$SALTAINTEGRACION" != "1") then {
CONFIG_HOSTS=www.example.com RUTA_RELATIVA=/ bin/rails test `find test/integration -name "*rb" -type f`
if (test "$?" != "0") then {
echo "No pasaron pruebas de integración";
exit 1;
} fi;
} fi;

} fi;

echo "== Pruebas de regresión al sistema"
echo "== PRUEBAS DE REGRESIÓN AL SISTEMA"
mkdir -p $rutaap/cobertura-sistema/
rm -rf $rutaap/cobertura-sistema/{*,.*}
if (test "$CI" = "") then { # Por ahora no en gitlab-ci
(cd $rutaap; RUTA_RELATIVA="/" CONFIG_HOSTS=127.0.0.1 ${RAILS} msip:stimulus_motores test:system &)
if (test "$CI" = "" -a "$SALTACAPYBARA" != "1") then { # Por ahora no en gitlab-ci
echo "== Con capybara $SALTACAPYBARA"
(cd $rutaap; RUTA_RELATIVA="/" CONFIG_HOSTS=127.0.0.1 ${RAILS} msip:stimulus_motores test:system)
if (test "$?" != "0") then {
echo "No pasaron pruebas del sistema rails";
exit 1;
} fi;
} fi;

if (test -f $rutaap/bin/pruebasjs -a "x$NOPRUEBAJS" != "x1") then {
(cd $rutaap; CONFIG_HOSTS=127.0.0.1 ${RAILS} msip:stimulus_motores; bin/pruebasjs)
if (test -f $rutaap/bin/pruebasjs.sh -a "x$NOPRUEBAJS" != "x1") then {
echo "== Con puppeteer"
(cd $rutaap; ${RAILS} msip:stimulus_motores; IPDES=127.0.0.1 bin/pruebasjs.sh)
if (test "$?" != "0") then {
echo "No pasaron pruebas del sistema js";
exit 1;
Expand Down

0 comments on commit ee7c6db

Please sign in to comment.