Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
danepowell committed May 13, 2024
1 parent 32facb5 commit c97782f
Show file tree
Hide file tree
Showing 10 changed files with 10 additions and 36,549 deletions.
30,379 changes: 0 additions & 30,379 deletions assets/acquia-spec.yaml

This file was deleted.

6,157 changes: 0 additions & 6,157 deletions assets/acsf-spec.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion tests/phpunit/src/CloudApi/AcsfClientServiceTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

class AcsfClientServiceTest extends TestBase {

protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../../assets/acsf-spec.yaml';
protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../../assets/acsf-spec.json';
protected string $apiCommandPrefix = 'acsf';

/**
Expand Down
3 changes: 0 additions & 3 deletions tests/phpunit/src/Commands/Acsf/AcsfApiCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@
*/
class AcsfApiCommandTest extends AcsfCommandTestBase {

protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../../../assets/acsf-spec.yaml';
protected string $apiCommandPrefix = 'acsf';

public function setUp(): void {
parent::setUp();
$this->clientProphecy->addOption('headers', ['Accept' => 'application/hal+json, version=2']);
Expand Down
4 changes: 4 additions & 0 deletions tests/phpunit/src/Commands/Acsf/AcsfCommandTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ abstract class AcsfCommandTestBase extends CommandTestBase {

protected string $acsfKey = 'h@x0r';

protected string $apiCommandPrefix = 'acsf';

protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../../../assets/acsf-spec.json';

/**
* @return array<mixed>
*/
Expand Down
6 changes: 1 addition & 5 deletions tests/phpunit/src/Commands/Acsf/AcsfListCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,11 @@
use Acquia\Cli\Command\Acsf\AcsfListCommandBase;
use Acquia\Cli\Command\CommandBase;
use Acquia\Cli\Command\Self\ListCommand;
use Acquia\Cli\Tests\CommandTestBase;

/**
* @property AcsfListCommandBase $command
*/
class AcsfListCommandTest extends CommandTestBase {

protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../../../assets/acsf-spec.yaml';
protected string $apiCommandPrefix = 'acsf';
class AcsfListCommandTest extends AcsfCommandTestBase {

public function setUp(): void {
parent::setUp();
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/src/Commands/Pull/PullCommandTestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ protected function mockExecuteMySqlImport(
$localMachineHelper->checkRequiredBinariesExist(['gunzip', 'mysql'])->shouldBeCalled();
$this->mockExecutePvExists($localMachineHelper, $pvExists);
$process = $this->mockProcess($success);
$filePath = Path::join(sys_get_temp_dir(), "$env-$dbName-$dbMachineName-2012-05-15T12:00:00Z.sql.gz");
$filePath = Path::join(sys_get_temp_dir(), "$env-$dbName-$dbMachineName-2012-05-15T12:00:00.000Z.sql.gz");
$command = $pvExists ? "pv $filePath --bytes --rate | gunzip | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName" : "gunzip -c $filePath | MYSQL_PWD=drupal mysql --host=localhost --user=drupal $localDbName";
// MySQL import command.
$localMachineHelper
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/src/Commands/Ssh/SshKeyInfoCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testInfo(): void {
$this->assertStringContainsString('UUID 02905393-65d7-4bef-873b-24593f73d273', $output);
$this->assertStringContainsString('Label PC Home', $output);
$this->assertStringContainsString('Fingerprint (md5) 5d:23:fb:45:70:df:ef:ad:ca:bf:81:93:cd:50:26:28', $output);
$this->assertStringContainsString('Created at 2017-05-09T20:30:35+00:00', $output);
$this->assertStringContainsString('Created at 2017-05-09T20:30:35.000Z', $output);
}

}
2 changes: 1 addition & 1 deletion tests/phpunit/src/Misc/ApiSpecTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class ApiSpecTest extends TestCase {

public function testApiSpec(): void {
$apiSpecFile = Path::canonicalize(__DIR__ . '/../../../../assets/acquia-spec.yaml');
$apiSpecFile = Path::canonicalize(__DIR__ . '/../../../../assets/acquia-spec.json');
$this->assertFileExists($apiSpecFile);
$apiSpec = file_get_contents($apiSpecFile);
$this->assertStringNotContainsString('x-internal', $apiSpec);
Expand Down
2 changes: 1 addition & 1 deletion tests/phpunit/src/TestBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
*/
abstract class TestBase extends TestCase {

protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../assets/acquia-spec.yaml';
protected string $apiSpecFixtureFilePath = __DIR__ . '/../../../assets/acquia-spec.json';

protected ConsoleOutput $consoleOutput;

Expand Down

0 comments on commit c97782f

Please sign in to comment.