Skip to content

Commit c0bf4c9

Browse files
authored
fix: build for 5.22.0 (#130)
1 parent 5bf4b9d commit c0bf4c9

File tree

7 files changed

+52
-281
lines changed

7 files changed

+52
-281
lines changed

test/configs/elasticms/demo-dev.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ EMSCO_DATE_TIME_FORMAT='j/m/Y \a\t G:i'
3838
EMSCO_DATEPICKER_FORMAT='dd/mm/yyyy'
3939
EMSCO_DATEPICKER_WEEKSTART='1'
4040
EMSCO_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED='[0,6]'
41-
EMSCO_ALLOW_USER_REGISTRATION='false'
42-
EMSCO_LOG_BY_PASS=true
4341
###< Core ###
4442

4543
###> EMSCH ###
44+
EMSCH_ENV='default'
45+
EMSCH_ENVS='{"default":{"alias":"ems_promo_v2_preview","backend":"http://demo-admin","router": false, "default": true}}'
4646
EMSCH_TEMPLATE_EMS_LINK='@EMSCH/template/ems/{type}.ems_link.twig'
4747
EMSCH_LOCALES='["en","fr","nl","de"]'
4848
EMSCH_TRANSLATION_TYPE='label'
4949
EMSCH_ROUTE_TYPE='route'
50-
EMSCH_TEMPLATES='{"template":{"name":"name","code":"body"}}'
50+
EMSCH_TEMPLATES='{"template": {"name": "name","code": "body"},"template_ems": {"name": "name","code": "body"}}'
5151
###< EMSCH ###

test/configs/elasticms/demo.env

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,14 @@ EMSCO_DATE_TIME_FORMAT='j/m/Y \a\t G:i'
3838
EMSCO_DATEPICKER_FORMAT='dd/mm/yyyy'
3939
EMSCO_DATEPICKER_WEEKSTART='1'
4040
EMSCO_DATEPICKER_DAYSOFWEEK_HIGHLIGHTED='[0,6]'
41-
EMSCO_ALLOW_USER_REGISTRATION='false'
42-
EMSCO_LOG_BY_PASS=true
4341
###< Core ###
4442

4543
###> EMSCH ###
44+
EMSCH_ENV='default'
45+
EMSCH_ENVS='{"default":{"alias":"ems_promo_v2_preview","backend":"http://demo-admin","router": false, "default": true}}'
4646
EMSCH_TEMPLATE_EMS_LINK='@EMSCH/template/ems/{type}.ems_link.twig'
4747
EMSCH_LOCALES='["en","fr","nl","de"]'
4848
EMSCH_TRANSLATION_TYPE='label'
4949
EMSCH_ROUTE_TYPE='route'
50-
EMSCH_TEMPLATES='{"template":{"name":"name","code":"body"}}'
50+
EMSCH_TEMPLATES='{"template":{"name":"name","code":"body"},"template_ems":{"name":"name","code":"body"}}'
5151
###< EMSCH ###

test/configs/skeleton/zz-live.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
###> Apache ###
2-
SERVER_NAME='demo'
2+
SERVER_NAME='demo-live'
33
SERVER_ALIASES='*'
44
APACHE_CACHE_CONTROL='immutable, max-age=63072000, public'
55
APACHE_ENVIRONMENTS='[]'
@@ -37,4 +37,4 @@ EMSCH_TEMPLATE_EMS_LINK='@EMSCH/template/ems/{type}.ems_link.twig'
3737

3838
###> EMS Form ###
3939
EMSF_LOAD_FROMJSON=true
40-
###< EMS Form ###
40+
###< EMS Form ###

test/docker-compose.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,8 @@ services:
109109
networks:
110110
default:
111111
aliases:
112-
- demo-admin
113112
- demo-admin-dev
114-
- demo-pgsql-admin
115-
- demo-pgsql-admin-dev
113+
- demo-admin
116114
container_name: ems
117115
environment:
118116
- AWS_S3_STORAGE_BUCKET_NAME=${BATS_S3_STORAGE_BUCKET_NAME}
@@ -137,12 +135,22 @@ services:
137135
- JOBS_ENABLED=${BATS_JOBS_ENABLED}
138136
- METRICS_ENABLED=${BATS_METRICS_ENABLED}
139137
- CLI_PHP_MEMORY_LIMIT=512M
138+
volumes:
139+
- ./demo/configs/admin:/opt/src/configs/admin
140+
- ./demo/configs/document:/opt/src/configs/document
140141
command: ["wait-for-it", "${BATS_DB_HOST}:${BATS_DB_PORT}", "--", "/usr/bin/supervisord", "-c", "/etc/supervisord/supervisord.conf"]
141142
mem_limit: 512m
143+
ports:
144+
- "8881:9000"
142145

143146
emsch:
144147
image: ${BATS_DOCKER_IMAGE_NAME}
145148
container_name: emsch
149+
networks:
150+
default:
151+
aliases:
152+
- demo-live
153+
- demo-preview-dev
146154
environment:
147155
- APP_ENV=dev
148156
- REDIS_HOST=${BATS_REDIS_HOST}
@@ -168,15 +176,15 @@ services:
168176
- METRICS_ENABLED=${BATS_METRICS_ENABLED}
169177
- VARNISH_ENABLED=${BATS_VARNISH_ENABLED}
170178
volumes:
171-
- ./demo/configs/admin:/opt/src/admin
172-
- ./demo/configs/document:/opt/src/document
173179
- ./demo/dist:/opt/src/public/skeleton:ro
174180
- ./demo/skeleton:/opt/src/local/ems_promo_v2_preview
175181
- ./demo/skeleton:/opt/src/local/ems_promo_v2_live
176182
- ./demo/skeleton:/opt/src/local/skeleton
177183
mem_limit: 512m
184+
ports:
185+
- "8882:9000"
178186

179187
networks:
180188
default:
181-
external:
182-
name: docker_default
189+
name: docker_default
190+
external: true

test/helpers/containers.bash

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
# Removes container $1
44
function container_clean {
55
run ${BATS_CONTAINER_ENGINE} kill $1 &>/dev/null ||:
6-
sleep .25s
6+
sleep 25
77
run ${BATS_CONTAINER_ENGINE} rm -vf $1 &>/dev/null ||:
8-
sleep .25s
8+
sleep 25
99
}
1010

1111
# get the ip of container $1
@@ -78,7 +78,7 @@ function container_wait_for_log {
7878
local -r container=$1
7979
local -ir timeout_sec=$2
8080
shift 2
81-
retry $(( $timeout_sec * 2 )) .5s container_assert_log $container "$*"
81+
retry $(( $timeout_sec * 2 )) 5 container_assert_log $container "$*"
8282
}
8383

8484
# wait for a container to produce a given text in its command output
@@ -90,7 +90,7 @@ function container_wait_for_command {
9090
local -r cmd=$2
9191
local -ir timeout_sec=$3
9292
shift 3
93-
retry $(( $timeout_sec * 2 )) .5s container_assert_command $container "$cmd" "$*"
93+
retry $(( $timeout_sec * 2 )) 5 container_assert_command $container "$cmd" "$*"
9494
}
9595

9696
# wait for a container healthy state
@@ -100,5 +100,5 @@ function container_wait_for_healthy {
100100
local -r container=$1
101101
local -ir timeout_sec=$2
102102
shift 2
103-
retry $(( $timeout_sec * 2 )) .5s container_assert_healthy $container
104-
}
103+
retry $(( $timeout_sec * 2 )) 0.5 container_assert_healthy $container
104+
}

test/helpers/tests.bash

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# Test if requirements are met
22
(
33
type ${BATS_CONTAINER_ENGINE} &>/dev/null || ( echo "${BATS_CONTAINER_ENGINE} is not available"; exit 1 )
4-
type ${BATS_CONTAINER_COMPOSE_ENGINE} &>/dev/null || ( echo "${BATS_CONTAINER_COMPOSE_ENGINE} is not available"; exit 1 )
54
)>&2
65

76
TEST_FILE=$(basename $BATS_TEST_FILENAME .bats)
@@ -59,4 +58,4 @@ function retry {
5958

6059
echo "Command \"$@\" failed $attempts times. Status: $status. Output: $output" >&2
6160
false
62-
}
61+
}

0 commit comments

Comments
 (0)