This repository has been archived by the owner on Apr 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added accessors for the shell_access, vcs_access, and blacklist in the
SshKey class. Also added access to the log data in the Task class. Added appropriate unit tests.
- Loading branch information
Paul Lovvik
committed
Mar 10, 2015
1 parent
f6baad4
commit 9129fe6
Showing
5 changed files
with
50 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -260,6 +260,9 @@ public function testCallSshKey() | |
$this->assertEquals('12345', $response->id()); | ||
$this->assertEquals('ssh-rsa AAAA== [email protected]', $response->publicKey()); | ||
$this->assertEquals('[email protected]', $response->nickname()); | ||
$this->assertEquals(TRUE, $response->shellAccess()); | ||
$this->assertEquals(TRUE, $response->vcsAccess()); | ||
$this->assertEquals(array('test'), $response->blacklist()); | ||
} | ||
|
||
public function testCallAddSshKey() | ||
|
@@ -733,6 +736,7 @@ public function testCallTask() | |
|
||
$this->assertEquals('https://cloudapi.example.com/v1/sites/stage-one%3Amysite/tasks/12345.json', $this->requestListener->getUrl()); | ||
$this->assertInstanceOf('\Acquia\Cloud\Api\Response\Task', $response); | ||
$this->assertEquals('started', $response->logs()); | ||
|
||
// NOTE: Task methods are already well-tested so we don't have to do | ||
// anything else here. | ||
|
@@ -746,6 +750,7 @@ public function testCallTaskInfo() | |
|
||
$this->assertEquals('https://cloudapi.example.com/v1/sites/stage-one%3Amysite/tasks/12345.json', $this->requestListener->getUrl()); | ||
$this->assertInstanceOf('\Acquia\Cloud\Api\Response\Task', $response); | ||
$this->assertEquals('started', $response->logs()); | ||
} | ||
|
||
public function testCallDomains() | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"id":"12345","ssh_pub_key":"ssh-rsa AAAA== [email protected]","nickname":"[email protected]"} | ||
{"id":"12345","ssh_pub_key":"ssh-rsa AAAA== [email protected]","nickname":"[email protected]","shell_access":"1","vcs_access":"1","blacklist":["test"]} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"recipient":"backup-123.stage-one.hosting.acquia.com","queue":"delete-db-backup","result":null,"completed":null,"started":null,"description":"Delete backup 12345 of database mysite in prod environment.","state":"received","id":"12345","sender":"cloud_api","percentage":null,"created":"1390535078","body":"[\"12345\"]","cookie":null,"hidden":"0"} | ||
{"recipient":"backup-123.stage-one.hosting.acquia.com","queue":"delete-db-backup","result":null,"completed":null,"started":null,"description":"Delete backup 12345 of database mysite in prod environment.","state":"received","id":"12345","sender":"cloud_api","percentage":null,"created":"1390535078","body":"[\"12345\"]","cookie":null,"hidden":"0","logs":"started"} |