refs #5739 feat: try run test back and front
gitea/salix/pipeline/head There was a failure building this commit Details

This commit is contained in:
Alex Moreno 2024-01-15 12:54:11 +01:00
parent 51dcc402ef
commit 417503bd06
7 changed files with 23 additions and 22 deletions

3
Jenkinsfile vendored
View File

@ -42,8 +42,7 @@ pipeline {
// sh "docker network ls | grep testing-\${env.STACK_NAME} | awk '{print \$1}' | xargs -r docker network rm"
sh "docker network ls | grep testing-salix-5739 | awk '{print \$1}' | xargs -r docker network rm"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml rm --stop"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db"
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build back" //Front depends on this image
sh "docker-compose -p testing-${env.STACK_NAME} -f docker-compose.test.yml build --force-rm db back"
}
}
stage('Test') {

View File

@ -22,7 +22,8 @@ async function test() {
isCI = true;
dataSources = JSON.parse(JSON.stringify(dataSources));
// dataSources.vn.port = 3308;
// dataSources.vn.host = 'db';
const bootOptions = {dataSources};
const app = require('vn-loopback/server/server');
await new Promise((resolve, reject) => {

View File

@ -19,11 +19,13 @@ services:
context: db
dockerfile: Dockerfile
ports:
- 3306:3306
- 3308:3306
front:
image: front
restart: always
command: ["npx", "jest", "--ci", "--maxWorkers=2"]
ports:
- 5000:5000
build:
context: .
dockerfile: front/Dockerfile.test
@ -41,16 +43,16 @@ services:
- NODE_ENV
depends_on:
- db
# e2e:
# image: e2e
# restart: always
# build:
# context: .
# dockerfile: e2e/Dockerfile
# environment:
# - NODE_ENV
# depends_on:
# - front
e2e:
image: e2e
restart: always
build:
context: .
dockerfile: e2e/Dockerfile
environment:
- NODE_ENV
depends_on:
- front
# networks:
# stack-network:

View File

@ -1,3 +1,3 @@
module.exports = {
url: 'http://back:5000'
url: 'back:5000'
};

View File

@ -56,7 +56,7 @@ async function test() {
}
async function backendStatus() {
log('Awaiting backend connection2...');
log('Awaiting backend connection...');
const milliseconds = 1000;
const maxAttempts = 10;

View File

@ -1,10 +1,8 @@
{
"name": "RoutesMonitor",
"base": "Loggable",
"options": {
"mysql": {
"table": "routesMonitor"
}
"base": "VnModel",
"mixins": {
"Loggable": true
},
"properties": {
"routeFk": {

View File

@ -3,5 +3,6 @@ docker-compose -p salix-test -f docker-compose.test.yml build --force-rm back
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm front
docker-compose -p salix-test -f docker-compose.test.yml build --force-rm e2e
docker-compose -p salix-test -f docker-compose.test.yml run e2e #--rm
docker-compose -p salix-testing -f docker-compose.test.yml rm -s -v -f
# docker-compose -p salix-test -f docker-compose.test.yml down
# docker-compose -p salix-test -f docker-compose.test.yml rm