diff --git a/Gemfile.lock b/Gemfile.lock index 93a630a..4f7a79e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -78,7 +78,7 @@ GEM ast (2.4.2) base64 (0.2.0) bcrypt (3.1.20) - bigdecimal (3.1.6) + bigdecimal (3.1.7) brakeman (6.1.2) racc builder (3.2.4) @@ -152,7 +152,7 @@ GEM net-smtp marcel (1.0.4) mini_mime (1.1.5) - minitest (5.22.2) + minitest (5.22.3) mustermann (3.0.0) ruby2_keywords (~> 0.0.1) mutex_m (0.2.0) diff --git a/cypress-tests/Dockerfile b/cypress-tests/Dockerfile index 886c924..434ccc4 100644 --- a/cypress-tests/Dockerfile +++ b/cypress-tests/Dockerfile @@ -1,4 +1,4 @@ -FROM cypress/included:12.4.0 +FROM cypress/included:13.2.0 COPY cypress.config.js / COPY ./tests/* /cypress/e2e/ \ No newline at end of file diff --git a/cypress-tests/cypress.config.js b/cypress-tests/cypress.config.js index e07d671..827086c 100644 --- a/cypress-tests/cypress.config.js +++ b/cypress-tests/cypress.config.js @@ -2,7 +2,7 @@ const { defineConfig } = require('cypress') module.exports = defineConfig({ e2e: { - baseUrl: 'http://wrestlingdev-test.wimer.house', + baseUrl: 'http://localhost', supportFile: false, video: false, }, diff --git a/cypress-tests/run-cypress-tests.sh b/cypress-tests/run-cypress-tests.sh index 8e86f74..27ed4be 100644 --- a/cypress-tests/run-cypress-tests.sh +++ b/cypress-tests/run-cypress-tests.sh @@ -1,13 +1,22 @@ -#!/bin/bash - #!/bin/bash project_dir="$(dirname $(readlink -f ${BASH_SOURCE[0]}))/.." +cd ${project_dir} -cd ${project_dir}/cypress-tests +cd deploy +bash deploy-test.sh + +cd ../cypress-tests # include ruby, mysql, memcached, and cypress in dockerfile to emulate prod? # then cypress points to localhost within the docker docker build -t wrestlingdev-cypress . -docker run -it --rm wrestlingdev-cypress \ No newline at end of file +docker run -i --rm --network=host wrestlingdev-cypress +test_results=$? + +cd ../deploy +docker-compose -f docker-compose-test.yml down +docker volume rm deploy_influxdb deploy_mysql + +exit $? diff --git a/db/seeds.rb b/db/seeds.rb index 37506d3..02d6c8e 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -31,7 +31,7 @@ User.create(id: 1, email: 'test@test.com', password: 'password', password_confirmation: 'password') # Pool to bracket - tournament = Tournament.create(id: 200, name: 'Test1', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Pool to bracket', user_id: 1, date: Date.today, is_public: true) + tournament = Tournament.create(id: 200, name: 'Pool to bracket', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Pool to bracket', user_id: 1, date: Date.today, is_public: true) create_schools(tournament, 16) weight_classes=Weight::HS_WEIGHT_CLASSES.split(",") tournament.create_pre_defined_weights(weight_classes) @@ -42,7 +42,7 @@ end # Modified 16 Man Double Elimination 1-6 - tournament = Tournament.create(id: 201, name: 'Test2', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true) + tournament = Tournament.create(id: 201, name: 'Modified 16 Man Double Elimination 1-6', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true) create_schools(tournament, 16) weight_classes=Weight::HS_WEIGHT_CLASSES.split(",") tournament.create_pre_defined_weights(weight_classes) @@ -53,7 +53,7 @@ end # Modified 16 Man Double Elimination 1-8 - tournament = Tournament.create(id: 202, name: 'Test3', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true) + tournament = Tournament.create(id: 202, name: 'Modified 16 Man Double Elimination 1-8', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Modified 16 Man Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true) create_schools(tournament, 16) weight_classes=Weight::HS_WEIGHT_CLASSES.split(",") tournament.create_pre_defined_weights(weight_classes) @@ -64,7 +64,7 @@ end # Regular Double Elimination 1-6 - tournament = Tournament.create(id: 203, name: 'Test4', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true) + tournament = Tournament.create(id: 203, name: 'Regular Double Elimination 1-6', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-6', user_id: 1, date: Date.today, is_public: true) create_schools(tournament, 16) weight_classes=Weight::HS_WEIGHT_CLASSES.split(",") tournament.create_pre_defined_weights(weight_classes) @@ -75,7 +75,7 @@ end # Regular Double Elimination 1-8 - tournament = Tournament.create(id: 204, name: 'Test5', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true) + tournament = Tournament.create(id: 204, name: 'Regular Double Elimination 1-8', address: 'some place', director: 'some guy', director_email: 'their@email.com', tournament_type: 'Regular Double Elimination 1-8', user_id: 1, date: Date.today, is_public: true) create_schools(tournament, 16) weight_classes=Weight::HS_WEIGHT_CLASSES.split(",") tournament.create_pre_defined_weights(weight_classes)