You are here

before_script.sh in Lightning Core 8.3

#!/usr/bin/env bash

# NAME
#     before_script.sh - Run ORCA tests
#
# SYNOPSIS
#     before_script.sh
#
# DESCRIPTION
#     Imports the database fixture for upgrade tests.

cd "$(dirname "$0")"; source _includes.sh

# Exit early if no DB fixture is specified.
[[ "$DB_FIXTURE" ]] || exit 0

cd "$ORCA_FIXTURE_DIR/docroot"

DB="$TRAVIS_BUILD_DIR/tests/fixtures/$DB_FIXTURE.php.gz"

php core/scripts/db-tools.php import ${DB}

drush php:script "$TRAVIS_BUILD_DIR/tests/update.php"

# Ensure menu_ui is installed.
drush pm-enable menu_ui --yes

drush updatedb --yes
drush update:lightning --no-interaction --yes

orca fixture:enable-extensions

# Reinstall from exported configuration to prove that it's coherent.
drush config:export --yes
drush site:install --yes --existing-config

# Big Pipe interferes with non-JavaScript functional tests, so uninstall it now.
drush pm-uninstall big_pipe --yes

# Set the fixture state to reset to between tests.
orca fixture:backup -f

File

tests/travis/before_script.sh
View source
  1. #!/usr/bin/env bash
  2. # NAME
  3. # before_script.sh - Run ORCA tests
  4. #
  5. # SYNOPSIS
  6. # before_script.sh
  7. #
  8. # DESCRIPTION
  9. # Imports the database fixture for upgrade tests.
  10. cd "$(dirname "$0")"; source _includes.sh
  11. # Exit early if no DB fixture is specified.
  12. [[ "$DB_FIXTURE" ]] || exit 0
  13. cd "$ORCA_FIXTURE_DIR/docroot"
  14. DB="$TRAVIS_BUILD_DIR/tests/fixtures/$DB_FIXTURE.php.gz"
  15. php core/scripts/db-tools.php import ${DB}
  16. drush php:script "$TRAVIS_BUILD_DIR/tests/update.php"
  17. # Ensure menu_ui is installed.
  18. drush pm-enable menu_ui --yes
  19. drush updatedb --yes
  20. drush update:lightning --no-interaction --yes
  21. orca fixture:enable-extensions
  22. # Reinstall from exported configuration to prove that it's coherent.
  23. drush config:export --yes
  24. drush site:install --yes --existing-config
  25. # Big Pipe interferes with non-JavaScript functional tests, so uninstall it now.
  26. drush pm-uninstall big_pipe --yes
  27. # Set the fixture state to reset to between tests.
  28. orca fixture:backup -f