Skip to content

Commit 7374a66

Browse files
committed
Update tests
1 parent 92c9896 commit 7374a66

File tree

8 files changed

+121
-167
lines changed

8 files changed

+121
-167
lines changed

test/6/5.3/docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ services:
1010
MYSQL_PASSWORD: drupal
1111

1212
php:
13-
image: $DRUPAL_PHP53
13+
image: $DRUPAL6_PHP53
1414
environment:
15+
DRUPAL_VERSION: 6
1516
PHP_SENDMAIL_PATH: '/bin/true'
1617
volumes:
1718
- codebase:/var/www/html
@@ -24,7 +25,7 @@ services:
2425
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
2526
NGINX_ERROR_LOG_LEVEL: debug
2627
NGINX_BACKEND_HOST: php
27-
NGINX_SERVER_ROOT: /var/www/html/app
28+
NGINX_SERVER_ROOT: /var/www/html/
2829
volumes:
2930
- codebase:/var/www/html
3031
depends_on:

test/6/5.3/test.sh

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@ DB_HOST=mariadb
1111
DB_USER=drupal
1212
DB_PASS=drupal
1313
DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}"
14-
DRUPAL6_DRUSH_ARCHIVE=https://s3-us-west-1.amazonaws.com/wodby-presets/drupal6/wodby-drupal6-latest.tar.gz
1514

16-
installDrupal() {
17-
# Site installation via drush is broken for Drupal 6.
18-
wget -q "${DRUPAL6_DRUSH_ARCHIVE}"
19-
drush archive-restore ./wodby-drupal6-latest.tar.gz --db-url="${DB_URL}"
20-
}
15+
drush si --db-url="${DB_URL}" -y
16+
drush dl memcache-6.x-1.11
2117

22-
runTests() {
23-
chmod 755 "${PWD}/sites/default/settings.php"
24-
echo "include '${PWD}/../test.settings.php';" >> "${PWD}/sites/default/settings.php"
18+
chmod 755 "${APP_ROOT}/sites/default/settings.php"
19+
echo "include '${APP_ROOT}/test.settings.php';" >> "${APP_ROOT}/sites/default/settings.php"
2520

26-
drush core-requirements | grep -s "PHP\s\+Info\s\+5.3"
27-
drush core-requirements | grep -s "Memcache admin\s\+OK\s\+Memcache included"
28-
drush core-requirements | grep -s "Memcache\s\+OK\s\+2.2.0"
29-
}
21+
drush en memcache -y
3022

31-
installDrupal
32-
cd ./app
33-
runTests
23+
drush core-requirements | grep -s "PHP\s\+Info\s\+5.3"
24+
drush core-requirements | grep -s "Memcache\s\+OK\s\+2.2.0"

test/6/5.6/docker-compose.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ services:
1010
MYSQL_PASSWORD: drupal
1111

1212
php:
13-
image: $DRUPAL_PHP56
13+
image: $DRUPAL6_PHP56
1414
environment:
15+
DRUPAL_VERSION: 6
1516
PHP_SENDMAIL_PATH: '/bin/true'
1617
volumes:
1718
- codebase:/var/www/html
@@ -24,7 +25,7 @@ services:
2425
NGINX_STATIC_CONTENT_OPEN_FILE_CACHE: "off"
2526
NGINX_ERROR_LOG_LEVEL: debug
2627
NGINX_BACKEND_HOST: php
27-
NGINX_SERVER_ROOT: /var/www/html/app
28+
NGINX_SERVER_ROOT: /var/www/html/
2829
volumes:
2930
- codebase:/var/www/html
3031
depends_on:

test/6/5.6/test.sh

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -11,23 +11,14 @@ DB_HOST=mariadb
1111
DB_USER=drupal
1212
DB_PASS=drupal
1313
DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}"
14-
DRUPAL6_DRUSH_ARCHIVE=https://s3-us-west-1.amazonaws.com/wodby-presets/drupal6/wodby-drupal6-latest.tar.gz
1514

16-
installDrupal() {
17-
# Site installation via drush is broken for Drupal 6.
18-
wget -q "${DRUPAL6_DRUSH_ARCHIVE}"
19-
drush archive-restore ./wodby-drupal6-latest.tar.gz --db-url=${DB_URL}
20-
}
15+
drush si --db-url="${DB_URL}" -y
16+
drush dl memcache-6.x-1.11
2117

22-
runTests() {
23-
chmod 755 "${PWD}/sites/default/settings.php"
24-
echo "include '${PWD}/../test.settings.php';" >> "${PWD}/sites/default/settings.php"
18+
chmod 755 "${APP_ROOT}/sites/default/settings.php"
19+
echo "include '${APP_ROOT}/test.settings.php';" >> "${APP_ROOT}/sites/default/settings.php"
2520

26-
drush core-requirements | grep -s "PHP\s\+Info\s\+5.6"
27-
drush core-requirements | grep -s "Memcache admin\s\+OK\s\+Memcache included"
28-
drush core-requirements | grep -s "Memcache\s\+OK\s\+2.2.0"
29-
}
21+
drush en memcache -y
3022

31-
installDrupal
32-
cd ./app
33-
runTests
23+
drush core-requirements | grep -s "PHP\s\+Info\s\+5.6"
24+
drush core-requirements | grep -s "Memcache\s\+OK\s\+2.2.0"

test/7/5.6/test.sh

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,38 @@ DB_USER=drupal
1212
DB_PASS=drupal
1313
DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}"
1414

15-
installDrupal() {
16-
drush si --db-url="${DB_URL}" -y
17-
}
18-
19-
installModules() {
20-
composer require -d /var/www/html \
21-
drupal/redis:3.x \
22-
drupal/search_api:1.x \
23-
drupal/search_api_solr:1.x \
24-
drupal/varnish:1.x \
25-
drupal/features:2.x
26-
27-
drush en -y redis search_api search_api_solr varnish features
28-
}
29-
30-
runTests() {
31-
# Enable redis
32-
chmod 755 "${PWD}/sites/default/settings.php"
33-
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
34-
drush cc all
35-
36-
# Test solr server connection
37-
drush en -y feature_search_api_solr
38-
drush core-requirements | grep -s "Solr servers\s\+OK"
39-
drush core-requirements | grep -s "The Solr server could be reached."
40-
41-
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
42-
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
43-
drush core-requirements | grep -s "PHP\s\+Info\s\+5.6"
44-
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
45-
46-
# Test varnish cache and purge
47-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
48-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
49-
50-
drush varnish-purge-all
51-
52-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
53-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
54-
}
15+
composer require \
16+
drupal/redis \
17+
drupal/search_api \
18+
drupal/search_api_solr \
19+
drupal/varnish \
20+
drupal/features
5521

5622
cd ./web
57-
installDrupal
58-
installModules
59-
runTests
23+
24+
drush si --db-url="${DB_URL}" -y
25+
drush en -y redis search_api search_api_solr varnish features
26+
27+
# Enable redis
28+
chmod 755 "${PWD}/sites/default/settings.php"
29+
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
30+
drush cc all
31+
32+
# Test solr server connection
33+
drush en -y feature_search_api_solr
34+
drush core-requirements | grep -s "Solr servers\s\+OK"
35+
drush core-requirements | grep -s "The Solr server could be reached."
36+
37+
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
38+
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
39+
drush core-requirements | grep -s "PHP\s\+Info\s\+5.6"
40+
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
41+
42+
# Test varnish cache and purge
43+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
44+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
45+
46+
drush varnish-purge-all
47+
48+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
49+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"

test/7/7.0/test.sh

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,38 @@ DB_USER=drupal
1212
DB_PASS=drupal
1313
DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}"
1414

15-
installDrupal() {
16-
drush si --db-url="${DB_URL}" -y
17-
}
18-
19-
installModules() {
20-
composer require -d /var/www/html \
21-
drupal/redis:3.x \
22-
drupal/search_api:1.x \
23-
drupal/search_api_solr:1.x \
24-
drupal/varnish:1.x \
25-
drupal/features:2.x
26-
27-
drush en -y redis search_api search_api_solr varnish features
28-
}
29-
30-
runTests() {
31-
# Enable redis
32-
chmod 755 "${PWD}/sites/default/settings.php"
33-
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
34-
drush cc all
35-
36-
# Test solr server connection
37-
drush en -y feature_search_api_solr
38-
drush core-requirements | grep -s "Solr servers\s\+OK"
39-
drush core-requirements | grep -s "The Solr server could be reached."
40-
41-
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
42-
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
43-
drush core-requirements | grep -s "PHP\s\+Info\s\+7.0"
44-
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
45-
46-
# Test varnish cache and purge
47-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
48-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
49-
50-
drush varnish-purge-all
51-
52-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
53-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
54-
}
15+
composer require \
16+
drupal/redis \
17+
drupal/search_api \
18+
drupal/search_api_solr \
19+
drupal/varnish \
20+
drupal/features
5521

5622
cd ./web
57-
installDrupal
58-
installModules
59-
runTests
23+
24+
drush si --db-url="${DB_URL}" -y
25+
drush en -y redis search_api search_api_solr varnish features
26+
27+
# Enable redis
28+
chmod 755 "${PWD}/sites/default/settings.php"
29+
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
30+
drush cc all
31+
32+
# Test solr server connection
33+
drush en -y feature_search_api_solr
34+
drush core-requirements | grep -s "Solr servers\s\+OK"
35+
drush core-requirements | grep -s "The Solr server could be reached."
36+
37+
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
38+
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
39+
drush core-requirements | grep -s "PHP\s\+Info\s\+7.0"
40+
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
41+
42+
# Test varnish cache and purge
43+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
44+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
45+
46+
drush varnish-purge-all
47+
48+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
49+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"

test/7/7.1/test.sh

Lines changed: 33 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -12,48 +12,38 @@ DB_USER=drupal
1212
DB_PASS=drupal
1313
DB_URL="mysql://${DB_USER}:${DB_PASS}@${DB_HOST}/${DB_NAME}"
1414

15-
installDrupal() {
16-
drush si --db-url="${DB_URL}" -y
17-
}
18-
19-
installModules() {
20-
composer require -d /var/www/html \
21-
drupal/redis:3.x \
22-
drupal/search_api:1.x \
23-
drupal/search_api_solr:1.x \
24-
drupal/varnish:1.x \
25-
drupal/features:2.x
26-
27-
drush en -y redis search_api search_api_solr varnish features
28-
}
29-
30-
runTests() {
31-
# Enable redis
32-
chmod 755 "${PWD}/sites/default/settings.php"
33-
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
34-
drush cc all
35-
36-
# Test solr server connection
37-
drush en -y feature_search_api_solr
38-
drush core-requirements | grep -s "Solr servers\s\+OK"
39-
drush core-requirements | grep -s "The Solr server could be reached."
40-
41-
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
42-
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
43-
drush core-requirements | grep -s "PHP\s\+Info\s\+7.1"
44-
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
45-
46-
# Test varnish cache and purge
47-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
48-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
49-
50-
drush varnish-purge-all
51-
52-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
53-
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
54-
}
15+
composer require \
16+
drupal/redis \
17+
drupal/search_api \
18+
drupal/search_api_solr \
19+
drupal/varnish \
20+
drupal/features
5521

5622
cd ./web
57-
installDrupal
58-
installModules
59-
runTests
23+
24+
drush si --db-url="${DB_URL}" -y
25+
drush en -y redis search_api search_api_solr varnish features
26+
27+
# Enable redis
28+
chmod 755 "${PWD}/sites/default/settings.php"
29+
echo "include '${PWD}/sites/default/test.settings.php';" >> "${PWD}/sites/default/settings.php"
30+
drush cc all
31+
32+
# Test solr server connection
33+
drush en -y feature_search_api_solr
34+
drush core-requirements | grep -s "Solr servers\s\+OK"
35+
drush core-requirements | grep -s "The Solr server could be reached."
36+
37+
drush core-requirements | grep -s "Database system\s\+Info\s\+MySQL, MariaDB"
38+
drush core-requirements | grep -s "Redis\s\+OK\s\+Connected, using the PhpRedis client"
39+
drush core-requirements | grep -s "PHP\s\+Info\s\+7.2"
40+
drush core-requirements | grep -s "Varnish status\s\+Info\s\+Running"
41+
42+
# Test varnish cache and purge
43+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
44+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"
45+
46+
drush varnish-purge-all
47+
48+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: MISS"
49+
curl -Is varnish:6081 | grep -s "X-Varnish-Cache: HIT"

test/images.env

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export DRUPAL_VARNISH=wodby/drupal-varnish:4.1-2.1.0
99

1010
# Drupal 6.
1111
export MEMCACHED=wodby/memcached:1.4-2.0.0
12-
export DRUPAL_PHP53=wodby/drupal-php:5.3-2.1.0
13-
export DRUPAL_PHP56=wodby/drupal-php:5.6-2.1.0
12+
export DRUPAL6_PHP53=wodby/drupal:6-5.3-2.1.0
13+
export DRUPAL6_PHP56=wodby/drupal:6-5.6-2.1.0
1414
export DRUPAL6_NGINX=wodby/drupal-nginx:6-1.10-2.1.0
1515

1616
# Drupal 7.

0 commit comments

Comments
 (0)