Skip to content
This repository was archived by the owner on Jan 2, 2019. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 6 additions & 8 deletions .env.dist
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,9 @@ PIM_DB_NAME=
PIM_DB_USER=
PIM_DB_PASSWORD=

# Behat stuff (Optional)
PIM_BEHAT_DB_HOST=mysql
PIM_BEHAT_DB_PORT=3306
PIM_BEHAT_DB_NAME=
PIM_BEHAT_DB_USER=
PIM_BEHAT_DB_PASSWORD=


# Integration Testing (Optional)
PIM_INTEGRATION_DB_HOST=mysql
PIM_INTEGRATION_DB_PORT=3306
PIM_INTEGRATION_DB_NAME=akeneo_pim_itest
PIM_INTEGRATION_DB_USER=root
PIM_INTEGRATION_DB_PASSWORD=
30 changes: 30 additions & 0 deletions install_integration_test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#!/bin/bash

# Store the machine name
if [ -n "${MACHINE_NAME}" ]; then
sed -i -E "s|MACHINE_NAME=(.*)|MACHINE_NAME=${MACHINE_NAME}|" .env
fi

# Use configuration for environment vars
source ./.env
if [ -z "${PIM_INTEGRATION_DB_NAME}" ] || [ -z "${PIM_INTEGRATION_DB_USER}" ]; then
echo ""
echo "Please set your integration environment values in '.env' file "
echo "and try again. Thank you Sir/Lady."

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should remove Sir/Lady 👍

echo ""
print_usage
exit 1
fi

function print_msg()
{
printf "$1\n"
}

print_msg "Creating Integration DB..."
docker exec akeneo_pim_app /var/www/pim/app/console pim:installer:db --env=test
print_msg "Done!"

print_msg "Running the migrations..."
docker exec -i akeneo_pim_app "${WEBROOT}"/app/console doctrine:migrations:migrate --no-interaction --env=test
print_msg "Done!"