diff --git a/CHANGELOG.md b/CHANGELOG.md index d658a5960..6e98e3933 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ #Change Log All notable changes to this project starting with the 0.6.0 release will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org) +##MASTER +### Fixed +- `site backups get` will now find and retrieve backups properly. (#632) + ##[0.9.0] - 2015-10-22 ### Added - `site environment-info --site= --env= [--field=]` (#582) diff --git a/php/Terminus/Helpers/Input.php b/php/Terminus/Helpers/Input.php index c7f649145..f731cee6a 100755 --- a/php/Terminus/Helpers/Input.php +++ b/php/Terminus/Helpers/Input.php @@ -14,6 +14,90 @@ class Input { public static $NULL_INPUTS = array('', 'false', 'None', 'Null', '0'); + /** + * Produces a menu to select a backup + * + * @param [array] $arg_options Elements as follows: + * [string] label Prompt for STDOUT + * [array] backups An array of stdClass objects representing backups + * [array] target_backup For STDERR, if necessary. As follows: + * [string] site Name of the site we want a backup from + * [string] env Name of the environment we want a backup from + * @return [stdClass] $target_backup An object representing the backup desired + */ + public static function backup(array $arg_options = array()) { + $default_options = array( + 'label' => 'Select a backup', + 'backups' => array(), + 'context' => array(), + ); + $options = array_merge($default_options, $arg_options); + $backups = $options['backups']; + if (empty($options['backups'])) { + throw new TerminusException( + 'No backups available. Create one with `terminus site backup create --site={site} --env={env}`', + $backups['context'], + 1 + ); + } + + $choices = array(); + foreach ($backups as $folder => $backup) { + if (!isset($backup->filename)) { + unset($backups[$folder]); + continue; + } + if (!isset($backup->folder)) { + $backup->folder = $folder; + } + $choices[] = $backup->filename; + } + $backups = array_values($backups); + $target_backup = $backups[self::menu($choices, null, $options['label'])]; + + return $target_backup; + } + + /** + * Produces a menu to narrow down an element selection + * + * @param [array] $arg_options Elements as follows: + * [array] args Arguments given via param + * [string] key Args key to search for + * [string] label Prompt for STDOUT + * [array] choices Menu options for the user + * @return [string] Either the selection, its index, or the default + */ + public static function backupElement(array $arg_options = array()) { + $default_options = array( + 'args' => array(), + 'key' => 'element', + 'label' => 'Select backup element', + 'choices' => array('code', 'database', 'files'), + ); + $options = array_merge($default_options, $arg_options); + + $args = $options['args']; + $key = $options['key']; + $choices = $options['choices']; + if (isset($args[$key])) { + if ($args[$key] == 'db') { + return 'database'; + } + if (in_array($args[$key], $options['choices'])) { + return $args[$key]; + } + throw new TerminusException( + '{element} is an invalid element. Please select one of the following: {choices}', + array('element' => $args[$key], 'choices' => implode(', ', $choices)), + 1 + ); + } + + $element = self::menu($choices, null, $options['label'], true); + return $element; + } + /** * Produces a menu with the given attributes * diff --git a/php/Terminus/Models/Environment.php b/php/Terminus/Models/Environment.php index c32101a19..fe0fcbfe7 100755 --- a/php/Terminus/Models/Environment.php +++ b/php/Terminus/Models/Environment.php @@ -43,73 +43,6 @@ public function addHostname($hostname) { return $response['data']; } - /** - * Lists all backups - * - * @param [string] $element e.g. code, file, db - * @return [array] $backups - */ - public function backups($element = null) { - if ($this->backups == null) { - $path = sprintf("environments/%s/backups/catalog", $this->get('id')); - $response = \TerminusCommand::request( - 'sites', - $this->site->get('id'), - $path, - 'GET' - ); - - $this->backups = $response['data']; - } - $backups = (array)$this->backups; - ksort($backups); - if ($element) { - $element = $this->elementAsDatabase($element); - foreach ($this->backups as $id => $backup) { - if (!isset($backup->filename)) { - unset($backups[$id]); - continue; - } - if (!preg_match("#.*$element\.\w+\.gz$#", $backup->filename)) { - unset($backups[$id]); - continue; - } - } - } - - return $backups; - } - - /** - * Gets the URL of a backup - * - * @param [string] $bucket Backup folder - * @param [string] $element e.g. files, code, database - * @return [array] $response['data'] - */ - public function backupUrl($bucket, $element) { - $element = $this->elementAsDatabase($element); - $path = sprintf( - 'environments/%s/backups/catalog/%s/%s/s3token', - $this->get('id'), - $bucket, - $element - ); - $data = array('method' => 'GET'); - $options = array( - 'body' => json_encode($data), - 'headers' => array('Content-type' => 'application/json') - ); - $response = \TerminusCommand::request( - 'sites', - $this->site->get('id'), - $path, - 'POST', - $options - ); - return $response['data']; - } - /** * Changes connection mode * @@ -495,6 +428,115 @@ public function domain() { return $host; } + /** + * Retrieves a backup by its filename + * + * @param [string] $file Name of the backup file requested + * @return [stdClass] $backup The backup object + */ + public function getBackupByFile($file) { + $regex = sprintf( + '/(%s_%s_\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}_UTC_(.*).sql|tar.gz)/', + $this->collection->site->get('name'), + $this->get('id') + ); + preg_match($regex, $file, $matches); + if (count($matches) < 3) { + throw new TerminusException( + 'Cannot find a backup named {file}.', + compact('file'), + 1 + ); + } + $element = $matches[2]; + $backups = $this->getFinishedBackups($element); + foreach ($backups as $folder => $backup) { + if ($backup->filename == $file) { + $target_backup = $backup; + if (!isset($target_backup->folder)) { + $target_backup->folder = $folder; + } + } + } + + if (!isset($target_backup)) { + throw new TerminusException( + 'Cannot find a backup named {file}.', + compact('file'), + 1 + ); + } + $target_backup->element = $element; + return $target_backup; + } + + /** + * Lists all backups + * + * @param [string] $element e.g. code, file, db + * @return [array] $backups + */ + public function getBackups($element = null) { + if ($this->backups == null) { + $path = sprintf("environments/%s/backups/catalog", $this->get('id')); + $response = \TerminusCommand::request( + 'sites', + $this->site->get('id'), + $path, + 'GET' + ); + + $this->backups = $response['data']; + } + $backups = (array)$this->backups; + ksort($backups); + if ($element) { + $element = $this->elementAsDatabase($element); + foreach ($this->backups as $id => $backup) { + if (!isset($backup->filename)) { + unset($backups[$id]); + continue; + } + if (!preg_match("#.*$element\.\w+\.gz$#", $backup->filename)) { + unset($backups[$id]); + continue; + } + } + } + + return $backups; + } + + /** + * Gets the URL of a backup + * + * @param [string] $bucket Backup folder + * @param [string] $element e.g. files, code, database + * @return [array] $response['data'] + */ + public function getBackupUrl($bucket, $element) { + $element = $this->elementAsDatabase($element); + $path = sprintf( + 'environments/%s/backups/catalog/%s/%s/s3token', + $this->get('id'), + $bucket, + $element + ); + $data = array('method' => 'GET'); + $options = array( + 'body' => json_encode($data), + 'headers' => array('Content-type' => 'application/json') + ); + $response = \TerminusCommand::request( + 'sites', + $this->site->get('id'), + $path, + 'POST', + $options + ); + return $response['data']; + } + /** * Returns the connection mode of this environment * @@ -518,6 +560,34 @@ public function getConnectionMode() { return $mode; } + /** + * Filters the backups for only ones which have finished + * + * @param [string] $element Element requested (i.e. code, db, or files) + * @return [array] $backups An array of stdClass objects representing backups + */ + public function getFinishedBackups($element) { + $all_backups = $this->getBackups($element); + + if (empty($all_backups)) { + throw new TerminusException( + 'No backups available. Create one with `terminus site backup create + --site={site} --env={env}`', + array('site' => $site->get('name'), 'env' => $this->get('id')), + 1 + ); + } + + $backups = array_filter( + $all_backups, + function($backup) { + return (isset($backup->finish_time) && $backup->finish_time); + } + ); + + return $backups; + } + /** * List hotnames for environment * @@ -543,6 +613,44 @@ public function getName() { return $name; } + /** + * Load site info + * + * @param [string] $key Set to retrieve a specific attribute as named + * @return [array] $info + */ + public function info($key = null) { + $path = sprintf('environments/%s', $this->get('id')); + $result = \TerminusCommand::request( + 'sites', + $this->site->get('id'), + $path, + 'GET' + ); + $connection_mode = null; + if (isset($result['data']->on_server_development)) { + $connection_mode = 'git'; + if ((boolean)$result['data']->on_server_development) { + $connection_mode = 'sftp'; + } + } + $info = array( + 'id' => $this->get('id'), + 'connection_mode' => $connection_mode, + 'php_version' => $this->site->info('php_version'), + ); + + if ($key) { + if (isset($info[$key])) { + return $info[$key]; + } else { + throw new TerminusException('There is no such field.', array(), 1); + } + } else { + return $info; + } + } + /** * Initializes the test/live environments on a newly created site and clones * content from previous environment (e.g. test clones dev content, live @@ -783,42 +891,4 @@ private function elementAsDatabase($element) { return $element; } - /** - * Load site info - * - * @param [string] $key Set to retrieve a specific attribute as named - * @return [array] $info - */ - public function info($key = null) { - $path = sprintf('environments/%s', $this->get('id')); - $result = \TerminusCommand::request( - 'sites', - $this->site->get('id'), - $path, - 'GET' - ); - $connection_mode = null; - if (isset($result['data']->on_server_development)) { - $connection_mode = 'git'; - if ((boolean)$result['data']->on_server_development) { - $connection_mode = 'sftp'; - } - } - $info = array( - 'id' => $this->get('id'), - 'connection_mode' => $connection_mode, - 'php_version' => $this->site->info('php_version'), - ); - - if ($key) { - if (isset($info[$key])) { - return $info[$key]; - } else { - throw new TerminusException('There is no such field.', array(), 1); - } - } else { - return $info; - } - } - } diff --git a/php/commands/site.php b/php/commands/site.php index 685bac28b..121163b0f 100755 --- a/php/commands/site.php +++ b/php/commands/site.php @@ -467,7 +467,7 @@ public function organizations($args, $assoc_args) { public function backups($args, $assoc_args) { $action = array_shift($args); $site = $this->sites->get(Input::sitename($assoc_args)); - $env = Input::env($assoc_args, 'env'); + $env = $site->environments->get(Input::env($assoc_args, 'env')); //Backward compatability supports "database" as a valid element value. if( isset($assoc_args['element']) @@ -480,92 +480,22 @@ public function backups($args, $assoc_args) { case 'get': $file = Input::optional('file', $assoc_args, false); if ($file) { - $regex = sprintf( - "/%s_%s_\d{4}-\d{2}-\d{2}T\d{2}-\d{2}-\d{2}_UTC_(.*).tar.gz/", - $site->get('name'), - $env - ); - preg_match($regex, $file, $matches); - $element = $matches[1]; - } elseif (isset($assoc_args['element'])) { - $element = $assoc_args['element']; + $backup = $env->getBackupByFile($file); + $element = $backup->element; } else { - $element = Terminus::menu( - array('code', 'files', 'db'), - null, - 'Select backup element', - true - ); - if (!in_array($element, array('code', 'files', 'db'))) { - $this->failure('Invalid backup element specified.'); - } - } - $latest = (boolean)Input::optional('latest', $assoc_args, false); + $element = Input::backupElement(array('args' => $assoc_args)); + $latest = (boolean)Input::optional('latest', $assoc_args, false); + $backups = $env->getFinishedBackups($element); - if (!in_array($element,array('code', 'files', 'db'))) { - $this->failure('Invalid backup element specified.'); - } - $latest = Input::optional('latest', $assoc_args, false); - $backups = $site->environments->get($env)->backups($element); - if (empty($backups)) { - $this->failure( - 'No backups available. Create one with `terminus site backup create --site={site} --env={env}`', - array('site' => $site->get('name'), 'env' => $env) - ); - } - - //Ensure that that backups being presented for retrieval have finished - $backups = array_filter($backups, function($backup) { - return (isset($backup->finish_time) && $backup->finish_time); - }); - - if ($latest) { - $backup = array_pop($backups); - } elseif ($file) { - do { - try { - $candidate = array_pop($backups); - } catch (\Exception $e) { - $this->failure("$file is not a valid backup archive"); - } - if ($candidate->filename == $file) { - $backup = $candidate; - } - } while (!isset($backup)); - } - - if (!isset($backup)) { - $menu = $folders = array(); - - foreach($backups as $folder => $backup) { - if (!isset($backup->filename)) { - continue; - } - if (!isset($backup->folder)) { - $backup->folder = $folder; - } - $menu[] = $backup->filename; + if ($latest) { + $backup = array_pop($backups); + } else { + $context = array('site' => $site->get('name'), 'env' => $env->get('id')); + $backup = Input::backup(array('backups' => $backups, 'context' => $context)); } - $index = Terminus::menu($menu, null, 'Select backup'); - $backup_elements = array_values($backups); - $backup = $backup_elements[$index]; - } - - if (empty($menu)) { - $this->failure( - 'No backups available. Create one with `terminus site backup create --site={site} --env={env}`', - array('site' => $site->get('name'), 'env' => $env) - ); - } - - $index = 0; - if (!$latest) { - $index = Terminus::menu($menu, null, 'Select backup'); } - $bucket = $buckets[$index]; - $filename = $menu[$index]; - $url = $site->environments->get($env)->backupUrl($bucket, $element); + $url = $env->getBackupUrl($backup->folder, $element); if (isset($assoc_args['to'])) { $target = str_replace('~', $_SERVER['HOME'], $assoc_args['to']); @@ -575,7 +505,7 @@ public function backups($args, $assoc_args) { } $this->log()->info('Downloading ... please wait ...'); if ($this->download($url->url, $target)) { - $this->log()->info('Downloaded {target}', array('target' => $target)); + $this->log()->info('Downloaded {target}', compact('target')); return $target; } else { $this->failure('Could not download file'); @@ -608,7 +538,7 @@ public function backups($args, $assoc_args) { $this->failure('MySQL does not appear to be installed on your server.'); } - $assoc_args['env'] = $env; + $assoc_args['env'] = $env->get('id'); $target = $this->backup(array('get'), $assoc_args); $target = '/tmp/' . Utils\getFilenameFromUrl($target); @@ -635,14 +565,13 @@ public function backups($args, $assoc_args) { $options = array('code', 'db', 'files', 'all'); $assoc_args['element'] = $options[Input::menu($options, 'all', 'Select element')]; } - $workflow = $site->environments->get($env)->createBackup($assoc_args); + $workflow = $env->createBackup($assoc_args); $workflow->wait(); $this->workflowOutput($workflow); break; case 'list': default: - $backups = $site->environments->get($env)->backups(); - //die(print_r($backups, true)); + $backups = $env->getBackups(); $element_name = false; if (isset($assoc_args['element']) && ($assoc_args['element'] != 'all')) { $element_name = $assoc_args['element']; diff --git a/tests/features/site_backup_get.feature b/tests/features/site_backup_get.feature new file mode 100644 index 000000000..d295461af --- /dev/null +++ b/tests/features/site_backup_get.feature @@ -0,0 +1,29 @@ +Feature: List Backups for a Site + + Scenario: Get the URL of the latest DB backup + @vcr site_backups_get_latest + Given I am authenticated + And a site named "[[test_site_name]]" + When I run "terminus site backups get --site=[[test_site_name]] --env=dev --element=db --latest" + Then I should get: "https://onebox-pantheon-backups.s3.amazonaws.com/d75eacdd-20d4-40d0-8178-74e4aed0dffc/dev/1444938388_backup/behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz?Signature=kVefOYFJzeDDmGYofUd1THg8XNo%3D&Expires=1445907646&AWSAccessKeyId=AKIAIYWQRFTHOPSVWJ2A" + + Scenario: Get the URL of a specific backup + @vcr site_backups_get_file + Given I am authenticated + And a site named "[[test_site_name]]" + When I run "terminus site backups get --site=[[test_site_name]] --env=dev --file=behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz" + Then I should get: "https://onebox-pantheon-backups.s3.amazonaws.com/d75eacdd-20d4-40d0-8178-74e4aed0dffc/dev/1444938388_backup/behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz?Signature=4Rp8YChvk%2Bbgm%2FCtM501mGEZ%2Fyo%3D&Expires=1445907654&AWSAccessKeyId=AKIAIYWQRFTHOPSVWJ2A" + + Scenario: Fail to get the URL of the latest backup of an invalid element + @vcr site_backups_get_invalid + Given I am authenticated + And a site named "[[test_site_name]]" + When I run "terminus site backups get --site=[[test_site_name]] --env=dev --element=invalid --latest" + Then I should get: "invalid is an invalid element. Please select one of the following: code, database, files" + + Scenario: Fail to get the URL of a specific backup + @vcr site_backups_get_file_invalid + Given I am authenticated + And a site named "[[test_site_name]]" + When I run "terminus site backups get --site=[[test_site_name]] --env=dev --file=invalid" + Then I should get: "Cannot find a backup named invalid." diff --git a/tests/fixtures/site_backups_get_file b/tests/fixtures/site_backups_get_file new file mode 100644 index 000000000..33fc00201 --- /dev/null +++ b/tests/fixtures/site_backups_get_file @@ -0,0 +1,247 @@ + +- + request: + method: POST + url: 'https://onebox/api/authorize' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Content-type: application/json + body: '{"email":"devuser@pantheon.io","password":"password1"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:47 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '182' + Connection: keep-alive + X-Pantheon-Trace-Id: c3108bd0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"session":"25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL","expires_at":1448326247,"user_id":"25069e79-eae7-4d41-8925-1f728a114cb8"}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/profile' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:49 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '823' + Connection: keep-alive + X-Pantheon-Trace-Id: c3e5b620-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"337-a38f4e7b"' + Vary: Accept-Encoding + body: '{"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:49 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c418d410-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"Q6op49G7x1f6d540eEgIvg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": null, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "behat-tests", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1444243380, "upstream_updates_by_environment": {"has_code": false}, "holder_type": "user", "service_level": "free", "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "behat-tests"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "preferred_zone": "onebox", "product_id": null}}, {"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "saras-test", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1443808912, "upstream_updates_by_environment": {"remote_head": "6b1eefb5269a266cca3db8ceb6372899e844a41c", "ahead": 1, "remote_branch": "refs/remotes/origin/master", "dev": {"has_code": true, "is_up_to_date_with_upstream": false}, "behind": 4, "has_code": true, "has_remote_head": false, "remote_url": "https://github.com/pantheon-systems/WordPress"}, "framework": "unknown", "holder_type": "user", "service_level": "free", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "Sara''s Test"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}, {"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}]' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/organizations?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:50 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c4701bd0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"cvUm20200ZYYi7ky6P8bGg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "admin", "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "enterpriseorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}}, {"archived": false, "invited_by_id": null, "role": "admin", "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "agencyorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "AgencyOrg"}, "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2"}}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/bf200cbe-8995-4891-b5d4-1a8bdc292905/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:50 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c4ba4430-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"NILj1BBNNA/XxbXrVGwYUw=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}, "tags": ["tag", "tag1", "tag2"]}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/14cfb348-40de-4ffb-86ad-5d0f861a38d2/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:50 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c503a940-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"2-d4cbb29"' + Vary: Accept-Encoding + body: '[]' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:52 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c5c376d0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"313-41670e71"' + Vary: Accept-Encoding + body: '{"dev": {"watchers": 1, "diffstat": {}, "on_server_development": true, "environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "0PILZVRUSVXS2H9FP33AJPQV4K68MHUA", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-sara-onebox1.onebox.pantheon.io"}, "test": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "FZSD6FRE7014HUQ1487JEVLA2061GSHU", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}, "live": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "QP67UIX3IBQF0G78N5DIG922UAKZ4O6B", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}}' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments/dev/backups/catalog' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:53 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '1240' + Connection: keep-alive + X-Pantheon-Trace-Id: c68c9330-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"fxGbIPjjsiPj7RP8MwH1vg=="' + Vary: Accept-Encoding + body: '{"1444938388_backup_database": {"task_id": "6dffcc3c-7375-11e5-beec-bc764e117665", "finish_time": 1444938395.36251, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/81/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz", "BUILD_TAG": "jenkins-backup_priority-81", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938394.711551, "size": 531, "timestamp": 1444938395}, "1444938388_backup_files": {"task_id": "6e0284d6-7375-11e5-beec-bc764e117665", "finish_time": 1444938394.304272, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_files.tar.gz", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938393.404781, "size": 169, "timestamp": 1444938394}, "1444938388_backup_manifest": {"total_dirs": 0, "total_size": 0, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 31536000, "total_files": 0, "folder": "1444938388_backup", "total_entries": 0, "size": 0, "timestamp": 1444938394}}' +- + request: + method: POST + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments/dev/backups/catalog/1444938388_backup/database/s3token' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c315355e-7c44-11e5-b40f-bc764e117665:HpXQzzayrqldfYfF4rAkL' + Content-type: application/json + body: '{"method":"GET"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:54 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '1097' + Connection: keep-alive + X-Pantheon-Trace-Id: c6d275d0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"access_key": "AKIAIYWQRFTHOPSVWJ2A", "url": "https://onebox-pantheon-backups.s3.amazonaws.com/d75eacdd-20d4-40d0-8178-74e4aed0dffc/dev/1444938388_backup/behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz?Signature=4Rp8YChvk%2Bbgm%2FCtM501mGEZ%2Fyo%3D&Expires=1445907654&AWSAccessKeyId=AKIAIYWQRFTHOPSVWJ2A", "bucket": "onebox-pantheon-backups", "signature": "LC9DQmIp/qxuKsL+MDtJHKZ/KlQ=", "policy": "eyJleHBpcmF0aW9uIjogIjIwMTUtMTAtMjlUMDA6MTA6NTRaIiwKICAgICAgICAgICAgICAgICAgICJjb25kaXRpb25zIjogWwogICAgICAgICAgICAgICAgICAgICB7ImJ1Y2tldCI6ICJvbmVib3gtcGFudGhlb24tYmFja3VwcyJ9LAogICAgICAgICAgICAgICAgICAgICB7ImtleSI6ICJkNzVlYWNkZC0yMGQ0LTQwZDAtODE3OC03NGU0YWVkMGRmZmMvZGV2LzE0NDQ5MzgzODhfYmFja3VwL2JlaGF0LXRlc3RzX2Rldl8yMDE1LTEwLTE1VDE5LTQ2LTI4X1VUQ19kYXRhYmFzZS5zcWwuZ3oifSwKICAgICAgICAgICAgICAgICAgICAgeyJhY2wiOiAicHJpdmF0ZSJ9LAogICAgICAgICAgICAgICAgICAgICBbInN0YXJ0cy13aXRoIiwgIiRzdWNjZXNzX2FjdGlvbl9zdGF0dXMiLCAiIl0sCiAgICAgICAgICAgICAgICAgICAgIFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCAxMDczNzQxODI0XQogICAgICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgICAgIH0=", "encryption_passphrase": null}' diff --git a/tests/fixtures/site_backups_get_file_invalid b/tests/fixtures/site_backups_get_file_invalid new file mode 100644 index 000000000..9fde18586 --- /dev/null +++ b/tests/fixtures/site_backups_get_file_invalid @@ -0,0 +1,218 @@ + +- + request: + method: POST + url: 'https://onebox/api/authorize' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Content-type: application/json + body: '{"email":"devuser@pantheon.io","password":"password1"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:01 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '182' + Connection: keep-alive + X-Pantheon-Trace-Id: cb388f10-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"session":"25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ","expires_at":1448326261,"user_id":"25069e79-eae7-4d41-8925-1f728a114cb8"}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/profile' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:02 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '823' + Connection: keep-alive + X-Pantheon-Trace-Id: cc14be40-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"337-a38f4e7b"' + Vary: Accept-Encoding + body: '{"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:03 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: cc5cead0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"Q6op49G7x1f6d540eEgIvg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": null, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "behat-tests", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1444243380, "upstream_updates_by_environment": {"has_code": false}, "holder_type": "user", "service_level": "free", "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "behat-tests"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "preferred_zone": "onebox", "product_id": null}}, {"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "saras-test", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1443808912, "upstream_updates_by_environment": {"remote_head": "6b1eefb5269a266cca3db8ceb6372899e844a41c", "ahead": 1, "remote_branch": "refs/remotes/origin/master", "dev": {"has_code": true, "is_up_to_date_with_upstream": false}, "behind": 4, "has_code": true, "has_remote_head": false, "remote_url": "https://github.com/pantheon-systems/WordPress"}, "framework": "unknown", "holder_type": "user", "service_level": "free", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "Sara''s Test"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}, {"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}]' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/organizations?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:03 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: ccb80320-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"cvUm20200ZYYi7ky6P8bGg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "admin", "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "enterpriseorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}}, {"archived": false, "invited_by_id": null, "role": "admin", "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "agencyorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "AgencyOrg"}, "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2"}}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/bf200cbe-8995-4891-b5d4-1a8bdc292905/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:04 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: cd20d710-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"NILj1BBNNA/XxbXrVGwYUw=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}, "tags": ["tag", "tag1", "tag2"]}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/14cfb348-40de-4ffb-86ad-5d0f861a38d2/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:05 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: cd6755f0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"2-d4cbb29"' + Vary: Accept-Encoding + body: '[]' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:06 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: ce399a10-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"313-41670e71"' + Vary: Accept-Encoding + body: '{"dev": {"watchers": 1, "diffstat": {}, "on_server_development": true, "environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "0PILZVRUSVXS2H9FP33AJPQV4K68MHUA", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-sara-onebox1.onebox.pantheon.io"}, "test": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "FZSD6FRE7014HUQ1487JEVLA2061GSHU", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}, "live": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "QP67UIX3IBQF0G78N5DIG922UAKZ4O6B", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}}' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments/dev/backups/catalog' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:cb3d0d6a-7c44-11e5-9129-bc764e117665:XdgEyAxeMGIdeFHkx6QTQ' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:51:07 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '1240' + Connection: keep-alive + X-Pantheon-Trace-Id: cefe49a0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"fxGbIPjjsiPj7RP8MwH1vg=="' + Vary: Accept-Encoding + body: '{"1444938388_backup_database": {"task_id": "6dffcc3c-7375-11e5-beec-bc764e117665", "finish_time": 1444938395.36251, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/81/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz", "BUILD_TAG": "jenkins-backup_priority-81", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938394.711551, "size": 531, "timestamp": 1444938395}, "1444938388_backup_files": {"task_id": "6e0284d6-7375-11e5-beec-bc764e117665", "finish_time": 1444938394.304272, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_files.tar.gz", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938393.404781, "size": 169, "timestamp": 1444938394}, "1444938388_backup_manifest": {"total_dirs": 0, "total_size": 0, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 31536000, "total_files": 0, "folder": "1444938388_backup", "total_entries": 0, "size": 0, "timestamp": 1444938394}}' diff --git a/tests/fixtures/site_backups_get_invalid b/tests/fixtures/site_backups_get_invalid new file mode 100644 index 000000000..408e36eb2 --- /dev/null +++ b/tests/fixtures/site_backups_get_invalid @@ -0,0 +1,191 @@ + +- + request: + method: POST + url: 'https://onebox/api/authorize' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Content-type: application/json + body: '{"email":"devuser@pantheon.io","password":"password1"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:55 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '182' + Connection: keep-alive + X-Pantheon-Trace-Id: c7830120-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"session":"25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore","expires_at":1448326255,"user_id":"25069e79-eae7-4d41-8925-1f728a114cb8"}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/profile' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:56 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '823' + Connection: keep-alive + X-Pantheon-Trace-Id: c8554540-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"337-a38f4e7b"' + Vary: Accept-Encoding + body: '{"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:57 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c8924e40-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"Q6op49G7x1f6d540eEgIvg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": null, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "behat-tests", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1444243380, "upstream_updates_by_environment": {"has_code": false}, "holder_type": "user", "service_level": "free", "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "behat-tests"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "preferred_zone": "onebox", "product_id": null}}, {"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "saras-test", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1443808912, "upstream_updates_by_environment": {"remote_head": "6b1eefb5269a266cca3db8ceb6372899e844a41c", "ahead": 1, "remote_branch": "refs/remotes/origin/master", "dev": {"has_code": true, "is_up_to_date_with_upstream": false}, "behind": 4, "has_code": true, "has_remote_head": false, "remote_url": "https://github.com/pantheon-systems/WordPress"}, "framework": "unknown", "holder_type": "user", "service_level": "free", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "Sara''s Test"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}, {"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}]' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/organizations?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:57 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c8ee02d0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"cvUm20200ZYYi7ky6P8bGg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "admin", "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "enterpriseorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}}, {"archived": false, "invited_by_id": null, "role": "admin", "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "agencyorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "AgencyOrg"}, "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2"}}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/bf200cbe-8995-4891-b5d4-1a8bdc292905/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:58 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c92f0370-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"NILj1BBNNA/XxbXrVGwYUw=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}, "tags": ["tag", "tag1", "tag2"]}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/14cfb348-40de-4ffb-86ad-5d0f861a38d2/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:58 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c9792bd0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"2-d4cbb29"' + Vary: Accept-Encoding + body: '[]' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:c7888816-7c44-11e5-b40f-bc764e117665:HFxUPaHCjjLFnXO49Xore' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:59 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: ca2f3560-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"313-41670e71"' + Vary: Accept-Encoding + body: '{"dev": {"watchers": 1, "diffstat": {}, "on_server_development": true, "environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "0PILZVRUSVXS2H9FP33AJPQV4K68MHUA", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-sara-onebox1.onebox.pantheon.io"}, "test": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "FZSD6FRE7014HUQ1487JEVLA2061GSHU", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}, "live": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "QP67UIX3IBQF0G78N5DIG922UAKZ4O6B", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}}' diff --git a/tests/fixtures/site_backups_get_latest b/tests/fixtures/site_backups_get_latest new file mode 100644 index 000000000..a8d047f13 --- /dev/null +++ b/tests/fixtures/site_backups_get_latest @@ -0,0 +1,247 @@ + +- + request: + method: POST + url: 'https://onebox/api/authorize' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Content-type: application/json + body: '{"email":"devuser@pantheon.io","password":"password1"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:40 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '182' + Connection: keep-alive + X-Pantheon-Trace-Id: beed47f0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"session":"25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU","expires_at":1448326240,"user_id":"25069e79-eae7-4d41-8925-1f728a114cb8"}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/profile' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:42 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '823' + Connection: keep-alive + X-Pantheon-Trace-Id: bfaa2f50-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"337-a38f4e7b"' + Vary: Accept-Encoding + body: '{"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:42 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: bfdcb100-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"Q6op49G7x1f6d540eEgIvg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": null, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "behat-tests", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1444243380, "upstream_updates_by_environment": {"has_code": false}, "holder_type": "user", "service_level": "free", "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "behat-tests"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "d75eacdd-20d4-40d0-8178-74e4aed0dffc", "preferred_zone": "onebox", "product_id": null}}, {"archived": false, "invited_by_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "role": "team_member", "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "name": "saras-test", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1443808912, "upstream_updates_by_environment": {"remote_head": "6b1eefb5269a266cca3db8ceb6372899e844a41c", "ahead": 1, "remote_branch": "refs/remotes/origin/master", "dev": {"has_code": true, "is_up_to_date_with_upstream": false}, "behind": 4, "has_code": true, "has_remote_head": false, "remote_url": "https://github.com/pantheon-systems/WordPress"}, "framework": "unknown", "holder_type": "user", "service_level": "free", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "attributes": {"label": "Sara''s Test"}, "holder": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "id": "2ff257ff-e84f-47e7-a075-f32b097d667e", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}, {"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}}]' +- + request: + method: GET + url: 'https://onebox/api/users/25069e79-eae7-4d41-8925-1f728a114cb8/memberships/organizations?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:42 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c02e2c60-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"cvUm20200ZYYi7ky6P8bGg=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "admin", "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "enterpriseorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}}, {"archived": false, "invited_by_id": null, "role": "admin", "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "key": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization_id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2", "user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "admin": true, "organization": {"profile": {"machine_name": "agencyorg", "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": 85, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": 85, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "AgencyOrg"}, "id": "14cfb348-40de-4ffb-86ad-5d0f861a38d2"}}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/bf200cbe-8995-4891-b5d4-1a8bdc292905/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:43 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c06bf8b0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"NILj1BBNNA/XxbXrVGwYUw=="' + Vary: Accept-Encoding + body: '[{"archived": false, "invited_by_id": null, "role": "team_member", "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "key": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "organization_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "site_id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "site": {"created_by_user_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "user_in_charge_id": "25069e79-eae7-4d41-8925-1f728a114cb8", "product": {"id": "d4689428-3759-465b-95f6-57ba58471461", "longname": "WordPress"}, "holder_id": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "name": "tagtest", "user_in_charge": {"profile": {"utm_term": "", "invites_to_nonuser": 3, "seen_first_time_user_popover": true, "utm_content": "", "experiments": {"welcome_video": "shown"}, "utm_device": "", "utm_campaign": "", "tracking_first_site_create": 1435803893, "verify": "b2d0bce5948360151624defd1a5362ac", "google_adwords_account_registered_sent": 1435781184, "invites_to_user": 52, "utm_medium": "", "job_function": "", "tracking_first_workflow_in_live": 1436916029, "tracking_first_team_invite": 1438207771, "firstname": "Dev", "invites_to_site": 55, "lastname": "User", "pda_campaign": null, "utm_source": "", "google_adwords_paid_for_site_sent": 1437064646, "last-org-spinup": "none", "web_services_business": null, "invites_sent": 55, "tracking_first_site_upgrade": 1436915774, "modified": 1435781178, "maxdevsites": 2, "lead_type": "", "organization": ""}, "id": "25069e79-eae7-4d41-8925-1f728a114cb8", "email": "devuser@pantheon.io"}, "created": 1440005865, "upstream_updates_by_environment": {"has_code": false}, "purchased_at": 1441233536, "instrument": "c71d4869-08ff-4720-af02-7352a17a85ec", "holder_type": "organization", "service_level": "enterprise", "framework": "drupal", "upstream": {"url": "https://github.com/pantheon-systems/WordPress", "product_id": "d4689428-3759-465b-95f6-57ba58471461", "branch": "master"}, "owner": "25069e79-eae7-4d41-8925-1f728a114cb8", "organization": "bf200cbe-8995-4891-b5d4-1a8bdc292905", "attributes": {"label": "Tagtest"}, "holder": {"profile": {"machine_name": null, "change_service_url": null, "example_url_3": null, "org_logo": null, "agency_url": null, "email_domain": null, "terms_of_service": null, "org_logo_height": null, "example_url_2": null, "example_url_1": null, "base_domain": null, "billing_url": null, "org_logo_width": null, "number_of_sites_launched": null, "country": null, "number_of_employees": null, "postal_code": null, "name": "EnterpriseOrg"}, "id": "bf200cbe-8995-4891-b5d4-1a8bdc292905"}, "id": "7339c114-8aca-48e2-a88a-fe3c10f24a9f", "preferred_zone": "onebox", "product_id": "d4689428-3759-465b-95f6-57ba58471461"}, "tags": ["tag", "tag1", "tag2"]}]' +- + request: + method: GET + url: 'https://onebox/api/organizations/14cfb348-40de-4ffb-86ad-5d0f861a38d2/memberships/sites?limit=100' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:43 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c0b97c70-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"2-d4cbb29"' + Vary: Accept-Encoding + body: '[]' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:44 GMT' + Content-Type: 'application/json; charset=utf-8' + Transfer-Encoding: chunked + Connection: keep-alive + X-Pantheon-Trace-Id: c16c78c0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"313-41670e71"' + Vary: Accept-Encoding + body: '{"dev": {"watchers": 1, "diffstat": {}, "on_server_development": true, "environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "0PILZVRUSVXS2H9FP33AJPQV4K68MHUA", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-sara-onebox1.onebox.pantheon.io"}, "test": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "FZSD6FRE7014HUQ1487JEVLA2061GSHU", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}, "live": {"environment_created": 1444243380, "dns_zone": "onebox.pantheon.io", "randseed": "QP67UIX3IBQF0G78N5DIG922UAKZ4O6B", "lock": {"username": null, "password": null, "locked": false}, "styx_cluster": "styx-onebox.onebox.pantheon.io"}}' +- + request: + method: GET + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments/dev/backups/catalog' + headers: + Host: onebox + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:46 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '1240' + Connection: keep-alive + X-Pantheon-Trace-Id: c22bd120-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + ETag: 'W/"fxGbIPjjsiPj7RP8MwH1vg=="' + Vary: Accept-Encoding + body: '{"1444938388_backup_database": {"task_id": "6dffcc3c-7375-11e5-beec-bc764e117665", "finish_time": 1444938395.36251, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/81/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz", "BUILD_TAG": "jenkins-backup_priority-81", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938394.711551, "size": 531, "timestamp": 1444938395}, "1444938388_backup_files": {"task_id": "6e0284d6-7375-11e5-beec-bc764e117665", "finish_time": 1444938394.304272, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "filename": "behat-tests_dev_2015-10-15T19-46-28_UTC_files.tar.gz", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 2592000, "folder": "1444938388_backup", "start_time": 1444938393.404781, "size": 169, "timestamp": 1444938394}, "1444938388_backup_manifest": {"total_dirs": 0, "total_size": 0, "endpoint_uuid": "endpoint1", "BUILD_URL": "https://162.242.168.41:8090/jenkins/job/backup_priority/80/", "BUILD_TAG": "jenkins-backup_priority-80", "ttl": 31536000, "total_files": 0, "folder": "1444938388_backup", "total_entries": 0, "size": 0, "timestamp": 1444938394}}' +- + request: + method: POST + url: 'https://onebox/api/sites/d75eacdd-20d4-40d0-8178-74e4aed0dffc/environments/dev/backups/catalog/1444938388_backup/database/s3token' + headers: + Host: onebox + Expect: null + Accept: null + User-Agent: 'Terminus/0.9.0 (php_version=5.6.14&script=boot-fs.php)' + Cookie: 'X-Pantheon-Session=25069e79-eae7-4d41-8925-1f728a114cb8:bef1bcfe-7c44-11e5-beec-bc764e117665:3oyRGKGikQiNLYGnWc3vU' + Content-type: application/json + body: '{"method":"GET"}' + response: + status: + http_version: '1.1' + code: '200' + message: OK + headers: + Server: nginx + Date: 'Tue, 27 Oct 2015 00:50:46 GMT' + Content-Type: 'application/json; charset=utf-8' + Content-Length: '1091' + Connection: keep-alive + X-Pantheon-Trace-Id: c27e36e0-7c44-11e5-a139-c95d7f8f209a + X-Frame-Options: deny + Access-Control-Allow-Methods: GET + Access-Control-Allow-Headers: 'Origin, Content-Type, Accept' + Vary: Accept-Encoding + body: '{"access_key": "AKIAIYWQRFTHOPSVWJ2A", "url": "https://onebox-pantheon-backups.s3.amazonaws.com/d75eacdd-20d4-40d0-8178-74e4aed0dffc/dev/1444938388_backup/behat-tests_dev_2015-10-15T19-46-28_UTC_database.sql.gz?Signature=kVefOYFJzeDDmGYofUd1THg8XNo%3D&Expires=1445907646&AWSAccessKeyId=AKIAIYWQRFTHOPSVWJ2A", "bucket": "onebox-pantheon-backups", "signature": "5OeECRgOzbQN39RglWsrM1ZLmlw=", "policy": "eyJleHBpcmF0aW9uIjogIjIwMTUtMTAtMjlUMDA6MTA6NDZaIiwKICAgICAgICAgICAgICAgICAgICJjb25kaXRpb25zIjogWwogICAgICAgICAgICAgICAgICAgICB7ImJ1Y2tldCI6ICJvbmVib3gtcGFudGhlb24tYmFja3VwcyJ9LAogICAgICAgICAgICAgICAgICAgICB7ImtleSI6ICJkNzVlYWNkZC0yMGQ0LTQwZDAtODE3OC03NGU0YWVkMGRmZmMvZGV2LzE0NDQ5MzgzODhfYmFja3VwL2JlaGF0LXRlc3RzX2Rldl8yMDE1LTEwLTE1VDE5LTQ2LTI4X1VUQ19kYXRhYmFzZS5zcWwuZ3oifSwKICAgICAgICAgICAgICAgICAgICAgeyJhY2wiOiAicHJpdmF0ZSJ9LAogICAgICAgICAgICAgICAgICAgICBbInN0YXJ0cy13aXRoIiwgIiRzdWNjZXNzX2FjdGlvbl9zdGF0dXMiLCAiIl0sCiAgICAgICAgICAgICAgICAgICAgIFsiY29udGVudC1sZW5ndGgtcmFuZ2UiLCAwLCAxMDczNzQxODI0XQogICAgICAgICAgICAgICAgICAgXQogICAgICAgICAgICAgICAgIH0=", "encryption_passphrase": null}'