Skip to content

Commit

Permalink
cleanup tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ondrajodas committed Jan 21, 2025
1 parent 721748d commit c4f5941
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 67 deletions.
32 changes: 0 additions & 32 deletions tests/phpunit/FunctionalAbsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -237,38 +237,6 @@ public function testSuccessfulRunOnlyStructure(): void
self::assertGreaterThan(0, count($events));
}

public function testBadBackupIdRun(): void
{
$fileSystem = new Filesystem();
$fileSystem->dumpFile(
$this->temp->getTmpFolder() . '/config.json',
(string) json_encode([
'action' => 'run',
'parameters' => [
'backupId' => $this->sapiClient->generateId(),
],
'image_parameters' => [
'storageBackendType' => Config::STORAGE_BACKEND_ABS,
'accountName' => getenv('TEST_AZURE_ACCOUNT_NAME'),
'#accountKey' => getenv('TEST_AZURE_ACCOUNT_KEY'),
'region' => getenv('TEST_AZURE_REGION'),
],
]),
);

$runProcess = $this->createTestProcess();
$runProcess->run();

$this->assertEquals(1, $runProcess->getExitCode());

$output = $runProcess->getOutput();
$errorOutput = $runProcess->getErrorOutput();

$this->assertEmpty($output);
$this->assertStringContainsString('The specified container', $errorOutput);
$this->assertStringContainsString('does not exist.', $errorOutput);
}

public function testRegionErrorRun(): void
{
$fileSystem = new Filesystem();
Expand Down
35 changes: 0 additions & 35 deletions tests/phpunit/FunctionalS3Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -274,41 +274,6 @@ public function testSuccessfulRunOnlyStructure(): void
self::assertGreaterThan(0, count($events));
}

public function testBadBackupIdRun(): void
{
$fileSystem = new Filesystem();
$fileSystem->dumpFile(
$this->temp->getTmpFolder() . '/config.json',
(string) json_encode([
'action' => 'run',
'parameters' => [
'backupId' => $this->sapiClient->generateId(),
],
'image_parameters' => [
'storageBackendType' => Config::STORAGE_BACKEND_S3,
'access_key_id' => getenv('TEST_AWS_ACCESS_KEY_ID'),
'#secret_access_key' => getenv('TEST_AWS_SECRET_ACCESS_KEY'),
'region' => getenv('TEST_AWS_REGION'),
'#bucket' => getenv('TEST_AWS_S3_BUCKET'),
],
]),
);

$runProcess = $this->createTestProcess();
$runProcess->run();

$this->assertEquals(1, $runProcess->getExitCode());

$output = $runProcess->getOutput();
$errorOutput = $runProcess->getErrorOutput();

$this->assertEmpty($output);
$this->assertStringMatchesFormat(
'Backup path "%s" not found in the bucket "%s".',
trim($errorOutput),
);
}

public function testCreateUnexistsBackupFolderS3(): void
{
$fileSystem = new Filesystem();
Expand Down

0 comments on commit c4f5941

Please sign in to comment.