Created
November 13, 2012 22:14
-
-
Save stovak/4068794 to your computer and use it in GitHub Desktop.
Test Solr Server Creation.
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
public function testCreateDestroy() { | |
$ssh = new \Apigee\Shiva\SolrProvisioner(); | |
$server = $ssh->getServer("dit"); | |
for($x=0; $x < 10 ; $x++) { | |
$name = "Unit-Test-".$this->randomName(8); | |
$ssh->create("dit", $name); | |
$response = $this->curlIt("http://".$server->hostname); | |
$this->assertTrue((strlen(response['raw']) > 0 && strpos($response['raw'], $name)), "Solr should list org the newly-created organization in its list."); | |
$ssh->destroy("dit", $name); | |
$response = $this->curlIt("http://".$server->hostname); | |
$this->assertFalse((strlen(response['raw']) > 0 && strpos($response['raw'], $name)), "Org should NOT be in the solr instance list."); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment