Skip to content

Commit 5ac1493

Browse files
committed
Added integration test for hypervisor
1 parent 6abc5b1 commit 5ac1493

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/integration/Compute/v2/CoreTest.php

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ public function runTests()
184184
// Hypervisors
185185
$this->listHypervisors();
186186
$this->getHypervisorsStatistics();
187+
$this->getHypervisor();
187188

188189
// Console
189190
$this->getVncConsole();
@@ -560,6 +561,21 @@ private function listHypervisors()
560561
$this->logStep('Listed all available hypervisors');
561562
}
562563

564+
private function getHypervisor()
565+
{
566+
$replacements = [
567+
'{hypervisorId}' => '1',
568+
];
569+
570+
require_once $this->sampleFile($replacements, 'hypervisors/get_hypervisor.php');
571+
572+
/**@var Hypervisor $hypervisor */
573+
$this->assertInstanceOf(Hypervisor::class, $hypervisor);
574+
$this->assertEquals($replacements['{hypervisorId}'], $hypervisor->id);
575+
576+
$this->logStep('Retrieved details for hypervisor id {hypervisorId}', $replacements);
577+
}
578+
563579
private function getHypervisorsStatistics()
564580
{
565581
require_once $this->sampleFile([], 'hypervisors/get_hypervisors_statistics.php');

0 commit comments

Comments
 (0)