Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Meldiron committed Nov 21, 2024
1 parent 7267748 commit 218cae3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Orchestration/Adapter/DockerCLI.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public function getStats(?string $container = null, array $filters = []): array
$result = Console::execute('docker stats --no-trunc --format "id={{.ID}}&name={{.Name}}&cpu={{.CPUPerc}}&memory={{.MemPerc}}&diskIO={{.BlockIO}}&memoryIO={{.MemUsage}}&networkIO={{.NetIO}}" --no-stream'.$containersString, '', $output);

if ($result !== 0) {
throw new Orchestration("Docker Error: {$output}");
return [];
}

$lines = \explode("\n", $output);
Expand Down
3 changes: 1 addition & 2 deletions tests/Orchestration/Base.php
Original file line number Diff line number Diff line change
Expand Up @@ -712,9 +712,8 @@ public function testUsageStats(): void
/**
* Test for Failure
*/
$this->expectException(\Exception::class);

$stats = static::getOrchestration()->getStats('IDontExist');
$this->assertCount(0, $stats);
}

public function testNetworkExists(): void
Expand Down

0 comments on commit 218cae3

Please sign in to comment.