2017 © Pedro Peláez
 

library pantheon-wordpress-upstream-tests

image

pantheon-systems/pantheon-wordpress-upstream-tests

  • Wednesday, June 6, 2018
  • by greg.1.anderson
  • Repository
  • 1 Watchers
  • 12 Stars
  • 6,247 Installations
  • Gherkin
  • 3 Dependents
  • 0 Suggesters
  • 2 Forks
  • 10 Open issues
  • 10 Versions
  • 7 % Grown

The README.md

pantheon-wordpress-upstream

Runs a Behat-based test suite against a given branch of the Pantheon WordPress upstream on Pantheon infrastructure to ensure the branch is fully functional on Pantheon., (*1)

CircleCI, (*2)

How It Works

The purpose of this repository is to ensure a given branch of the Pantheon WordPress Upstream is fully functional on Pantheon infrastructure. This is used as a part of Pantheon's automated WordPress updating process., (*3)

On a high level, here's how it works:, (*4)

  1. A new CircleCI job is initiated through a cron job, or when a push is made against the WordPress upstream.
  2. The job environment defines three important environment variables:
    • TERMINUS_TOKEN - A machine token used for creating and deleting site environments on Pantheon. Because this token is meant to be kept secret, the value is set in the CircleCI admin, and not tracked in circle.yml.
    • TERMINUS_SITE - An existing Pantheon site to be used for running the test suite. This site must support multidev, and the TERMINUS_TOKEN must be able to create and delete environments for this site.
    • TERMINUS_ENV - A unique name for the multidev branch to be created, to prevent collisions between jobs.
  3. CircleCI installs Terminus, an interface for programmatically interacting with Pantheon.
  4. The test suite runs in three steps:
    1. prepare.sh - Prepares the Pantheon site environment to have the test suite run against it. Preparation includes:
    • Creating the site environment using Terminus.
    1. test.sh - Runs the Behat test suite against the created environment.
    2. cleanup.sh - Cleans up after the test suite has completed. Cleanup includes:
    • Deleting the site environment using Terminus.

And that's it!, (*5)

Making Improvements

Need to improve this test runner in some way? You can clone the repository locally and run it against any Pantheon site., (*6)

WARNING! WARNING!, (*7)

PLEASE READ THE FOLLOWING VERY CAREFULLY., (*8)

BY FORCE PUSHING AGAINST TERMINUS_ENV AND ERASING THE DATABASE, THIS TEST RUNNER IRREVOCABLY DAMAGES YOUR PANTHEON SITE. USE ONLY WITH A SINGLE-USE, "THROWAWAY" SITE. DO NOT USE WITH ANY PANTHEON SITE THAT CANNOT BE DELETED., (*9)

With the warning out of the way, here's how you can use the test runner locally., (*10)

First, make sure Terminus is installed and authenticated:, (*11)

composer global require pantheon-systems/terminus
terminus auth login --machine-token=<secret-token>

Then, you can clone and use the test runner:, (*12)

git clone git@github.com:pantheon-systems/pantheon-wordpress-upstream-tests.git
cd pantheon-wordpress-upstream-tests
export TERMINUS_SITE=wordpress-upstream
export TERMINUS_ENV=test-1
export WORDPRESS_ADMIN_USERNAME=pantheon
export WORDPRESS_ADMIN_PASSWORD="$(openssl rand -hex 8)"
./prepare.sh
./test.sh
./cleanup.sh

Feel free to open an issue with any questions you may have., (*13)

The Versions

06/06 2018
13/07 2017

dev-composer-lock

dev-composer-lock

  Sources   Download

The Requires

 

by Avatar pantheon

07/06 2017

dev-relocated-wp-admin-support

dev-relocated-wp-admin-support

  Sources   Download

The Requires

 

by Avatar pantheon

05/06 2017

dev-handle-wp-subdir--rebase--with-mink--rebase

dev-handle-wp-subdir--rebase--with-mink--rebase

  Sources   Download

The Requires

 

by Avatar pantheon

24/05 2017

dev-handle-wp-subdir--rebase--with-mink

dev-handle-wp-subdir--rebase--with-mink

  Sources   Download

The Requires

 

by Avatar pantheon

21/05 2017

dev-handle-wp-subdir--rebase

dev-handle-wp-subdir--rebase

  Sources   Download

The Requires

 

by Avatar pantheon

19/05 2017

dev-handle-wp-subdir

dev-handle-wp-subdir

  Sources   Download

The Requires

 

by Avatar pantheon

23/08 2016

dev-behat-strict

dev-behat-strict

  Sources   Download

The Requires

 

by Avatar pantheon

22/08 2016

dev-failing-test

dev-failing-test

  Sources   Download

The Requires

 

by Avatar pantheon

04/08 2016

dev-behat-global

dev-behat-global

  Sources   Download

The Requires

 

by Avatar pantheon