Setup e2e enterprise tests

This commit is contained in:
Ibukun Dairo 2020-03-10 23:14:42 +01:00
parent 10c431d230
commit f9cec8a290
8 changed files with 41 additions and 2 deletions

View File

@ -697,6 +697,7 @@ e2e_docker_compose_test:
# Install Docker Compose.
- sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
- export IS_SAAS_SERVICE=true
# Install the cluster.
- sudo bash install.sh
# Set env var
@ -714,6 +715,29 @@ e2e_docker_compose_test:
- release
- master
e2e_docker_compose_enterprise_test:
stage: E2E
script:
- sudo apt-get update
- curl -sSL https://get.docker.com/ | sh #Install docker.
# Install Docker Compose.
- sudo curl -L "https://github.com/docker/compose/releases/download/1.25.4/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
- sudo chmod +x /usr/local/bin/docker-compose
# Install the cluster.
- sudo bash install.sh
# Set env var
- export ACCOUNTS_URL=http://localhost:3003
- export ADMIN_DASHBOARD_URL=http://localhost:3100
- export DASHBOARD_URL=http://localhost:3000
- export BACKEND_URL=http://localhost:3002
- cd smoke-test
- npm ci
- npm run enterprise-test
only:
refs:
- release
- master
# VERSION UPDATE
version_update:
before_script:

View File

@ -22,6 +22,7 @@ services:
environment:
- MONGO_URL=mongodb://mongo:27017/fyipedb
- REDIS_HOST=redis
- IS_SAAS_SERVICE
depends_on:
- mongo
- redis
@ -33,6 +34,8 @@ services:
build: ./accounts
env_file:
- ./accounts/.env
environment:
- IS_SAAS_SERVICE
depends_on:
- backend
@ -42,8 +45,11 @@ services:
build: ./dashboard
env_file:
- ./dashboard/.env
environment:
- IS_SAAS_SERVICE
depends_on:
- backend
- accounts
home:
ports:
@ -66,9 +72,11 @@ services:
admin-dashboard:
ports:
- '3100:3100'
build: ./admin-dashboard
env_file:
- ./admin-dashboard/.env
build: ./admin-dashboard
environment:
- IS_SAAS_SERVICE
depends_on:
- backend
- accounts

0
install.sh Normal file → Executable file
View File

View File

View File

View File

View File

@ -4,7 +4,8 @@
"description": "Smoke tests for fyipe",
"main": "index.test.js",
"scripts": {
"test": "jest --runInBand ."
"test": "jest --runInBand ./*.test.js",
"enterpise-test": "jest --runInBand ./*.test.enterprise.js"
},
"keywords": [],
"author": "",
@ -15,5 +16,11 @@
"jest": "^24.9.0",
"puppeteer": "^1.19.0",
"should": "^13.2.3"
},
"jest": {
"testMatch": [
"<rootDir>/**/*.test.js",
"<rootDir>/**/*.test.enterprise.js"
]
}
}