summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHerman van Rink2015-03-31 15:29:42 +0200
committerHerman van Rink2015-04-22 14:51:42 +0200
commitdc9caa4bbf47a82b3e928e9587512cbf4843c6f0 (patch)
tree7df40465ddbcd080a334dc97c18c8bfbf29ba085
parent6b0c565fe7c26841564236d184188e3f9df7b87a (diff)
Add provision-tests-new-run command to start testing D8.7.x-4.x
-rw-r--r--provision-tests/makes/drupal8.make6
-rw-r--r--provision-tests/makes/drupal8dev.make9
-rw-r--r--provision-tests/provision_tests.drush.inc54
3 files changed, 64 insertions, 5 deletions
diff --git a/provision-tests/makes/drupal8.make b/provision-tests/makes/drupal8.make
index abb164c..55bf353 100644
--- a/provision-tests/makes/drupal8.make
+++ b/provision-tests/makes/drupal8.make
@@ -1,9 +1,5 @@
api = 2
core = 8.x
-;projects[] = "drupal"
-
-projects[drupal][download][type] = git
-projects[drupal][download][url] = http://git.drupal.org/project/drupal.git
-projects[drupal][download][branch] = 8.0.x
+projects[] = "drupal"
diff --git a/provision-tests/makes/drupal8dev.make b/provision-tests/makes/drupal8dev.make
new file mode 100644
index 0000000..abb164c
--- /dev/null
+++ b/provision-tests/makes/drupal8dev.make
@@ -0,0 +1,9 @@
+api = 2
+
+core = 8.x
+;projects[] = "drupal"
+
+projects[drupal][download][type] = git
+projects[drupal][download][url] = http://git.drupal.org/project/drupal.git
+projects[drupal][download][branch] = 8.0.x
+
diff --git a/provision-tests/provision_tests.drush.inc b/provision-tests/provision_tests.drush.inc
index 8437e5d..6e5086e 100644
--- a/provision-tests/provision_tests.drush.inc
+++ b/provision-tests/provision_tests.drush.inc
@@ -23,6 +23,15 @@ function provision_tests_drush_command() {
'hosting',
),
);
+ $items['provision-tests-new-run'] = array(
+ 'description' => dt('Runs NEW provision tests'),
+ 'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
+ // Although we're a provision command, we require hostmaster to be around to
+ // run the tests correctly
+ 'drupal dependencies' => array(
+ 'hosting',
+ ),
+ );
$items['provision-demo-content'] = array(
'description' => dt('Setup some demo content on a fresh Aegir install'),
'bootstrap' => DRUSH_BOOTSTRAP_DRUPAL_FULL,
@@ -98,6 +107,50 @@ function drush_provision_tests_run() {
drush_log(dt('Tests completed successfully'), 'success');
}
+
+/**
+ * Drush command to run the provision tests.
+ */
+function drush_provision_tests_new_run() {
+ if (!drush_confirm(dt('This command should only be run on a clean Aegir install, and data may be lost! Do you want to continue?'))) {
+ return drush_user_abort();
+ }
+
+ // Disable the tasks queue, we run them manually instead.
+ $queue_status_initial = variable_get('hosting_queue_tasks_enabled', '0');
+ variable_set('hosting_queue_tasks_enabled', '0');
+
+ // 'Stable' D8 e.g. latest (beta) release.
+ drush_provision_tests_install_platform('drupal8');
+ drush_provision_tests_install_site('drupal8', 'drupal8-minimal', 'minimal');
+
+ // Dev D8 latest git commit.
+ drush_provision_tests_install_platform('drupal8dev');
+ drush_provision_tests_install_site('drupal8dev', 'drupal8-dev-minimal', 'minimal');
+
+ // Migrate a D8 site from the current release to the latest commit.
+ drush_provision_tests_install_site('drupal8', 'drupal8-upgrade-d8', 'minimal');
+ drush_provision_tests_migrate_site('drupal8-upgrade-d8', 'drupal8dev');
+
+ // Cleanup.
+ drush_provision_tests_remove_site('drupal8-upgrade-d8');
+ drush_provision_tests_remove_site('drupal8-minimal');
+ drush_provision_tests_remove_site('drupal8-dev-minimal');
+ drush_provision_tests_remove_platform('drupal8');
+ drush_provision_tests_remove_platform('drupal8dev');
+
+ // Restore the tasks queue status:
+ variable_set('hosting_queue_tasks_enabled', $queue_status_initial);
+
+ if (drush_get_error() != DRUSH_SUCCESS) {
+ drush_set_error(drush_get_error(), 'Running tests failed');
+ exit(1);
+ }
+
+ drush_log(dt('Tests completed successfully'), 'success');
+}
+
+
/**
* Drush command to setup some demo platforms and sites.
*
@@ -117,6 +170,7 @@ function drush_provision_tests_provision_demo_content() {
drush_provision_tests_install_platform('drupal8');
drush_provision_tests_install_site('drupal8', 'drupal8-minimal', 'minimal');
+ // Prepare some platforms.
drush_provision_tests_install_platform('drupal6');
drush_provision_tests_install_platform('drupal7');
drush_provision_tests_install_platform('openatrium2');