Skip to content

Commit

Permalink
create ready page after initialization script
Browse files Browse the repository at this point in the history
  • Loading branch information
rrennick committed Jun 16, 2020
1 parent 617a523 commit 239476d
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions tests/e2e/env/docker/wp-cli/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ if $(wp core is-installed);
then
echo "Wordpress is already installed..."
else
WORDPRESS_INSTALLING=1
declare -p WORDPRESS_TITLE >/dev/null
declare -p WORDPRESS_LOGIN >/dev/null
declare -p WORDPRESS_PASSWORD >/dev/null
Expand All @@ -45,11 +46,6 @@ else
--admin_password=${WORDPRESS_PASSWORD} \
--admin_email=${WORDPRESS_EMAIL} \
--skip-email
wp post create \
--post_type=page \
--post_status=publish \
--post_title='Ready' \
--post_content='E2E-tests.'
fi

## Check for an initialization script.
Expand All @@ -66,5 +62,14 @@ if ! [[ ${CURRENT_DOMAIN} == ${URL} ]]; then
wp search-replace ${CURRENT_DOMAIN} ${URL}
fi

if [[ $WORDPRESS_INSTALLING ]];
then
wp post create \
--post_type=page \
--post_status=publish \
--post_title='Ready' \
--post_content='E2E-tests.'
fi

echo "Visit $(wp option get siteurl)"
touch /var/www/html/.initialized

0 comments on commit 239476d

Please sign in to comment.