My restless head Drupal 8 workflow testing patches

Restless head(s) @ DrupalCon Amsterdam 2014

It's not a big brainer but quite effective to have a setup guide during sprint time and through the issue queue to be up to par with each other.

So we created this Drupal Rest Test script to test against Drupal.

To step up a little more its handy to have the same code base too using a shared Drupal clone.

Drupal terminal

$ d8 # alias to quickly switch context
$ git checkout 8.0.x
$ git pull

Rest script

$ rest # alias to quickly switch context
$ ./ full-install
Running: full-install
Running: install
You are about to DROP all tables in your 'drupal_d8' database. Do you want to continue? (y/n): y
Starting Drupal installation. This takes a while. Consider using the --notify global option. [ok]
Installation complete.  User name: admin  User password: wH4dEVgouA [ok]
Congratulations, you installed Drupal!Drupal installation complete [status]
Changed password for admin [success]
git package handler needs git_deploy module enabled to work properly. [warning]
Install location /Users/clemens/Sites/drupal/d8/www//modules/devel already exists. Do you want to overwrite it? (y/n): y
3  users created. [status]
Generate process complete. [status]
Created the following new terms: shuphiciko, ciproc, gec, slushespos [status]
Generate process complete. [status]
Added "create article content" to "Anonymous user" [success]
Added "edit any article content" to "Anonymous user" [success]
+ curl --user admin:admin --header 'Accept: application/hal+json' --header 'Accept-Language: en' --header 'Content-Language: en' --request GET http://drupal.d8/node
+ curl --user admin:admin --header 'Accept: application/hal+json' --header 'Accept-Language: en' --header 'Content-Language: en' --request GET http://drupal.d8/node/1
+ curl --user admin:admin --header 'Accept: application/hal+json' --header 'Accept-Language: en' --header 'Content-Language: en' --request GET http://drupal.d8/entity/file/1


  • Installs Drupal 8
  • Adds needed or useful contrib /modules
  • Configure Drupal for REST and HAL request
  • Tries to add a REST export display
  • Runs curl GET request for REST and HAL as admin and anonymous

Work on patch

$ wget
$ git apply rest-relation-domain-2336247.19.patch
$ git diff
$ git checkout -b feature/2336247-rest-relation-domain

Test the patch

$ ./ hal node
$ ./ rest node
$ ./ hal comment
$ ./ rest anon comment