This commit is contained in:
Bozhidar 2024-05-16 10:38:20 +03:00
parent 644bfd51be
commit bdd02906d8
5 changed files with 20 additions and 0 deletions

View file

@ -4,6 +4,7 @@ namespace Tests\Unit;
use App\Http\Middleware\ApiKeyMiddleware;
use App\Installers\Server\Applications\PHPInstaller;
use App\Jobs\ApacheBuild;
use App\Models\Database;
use App\Models\DatabaseUser;
use App\Models\Domain;
@ -96,6 +97,9 @@ class HSCreateTest extends ActionTestCase
]
)->json();
$apacheBuild = new ApacheBuild();
$apacheBuild->handle();
$this->assertArrayHasKey('status', $callHostingSubscriptionStoreResponse);
$this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok');

View file

@ -6,6 +6,7 @@ use App\Http\Middleware\ApiKeyMiddleware;
use App\Installers\Server\Applications\NodeJsInstaller;
use App\Installers\Server\Applications\PHPInstaller;
use App\Installers\Server\Applications\PythonInstaller;
use App\Jobs\ApacheBuild;
use App\Models\Database;
use App\Models\DatabaseUser;
use App\Models\Domain;
@ -140,6 +141,9 @@ class HSNodeJSTest extends ActionTestCase
]
)->json();
$apacheBuild = new ApacheBuild();
$apacheBuild->handle();
$this->assertArrayHasKey('status', $callHostingSubscriptionStoreResponse);
$this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok');

View file

@ -130,6 +130,9 @@ class HostingSubscriptionWithPythonCreateTest extends ActionTestCase
]
)->json();
$apacheBuild = new ApacheBuild();
$apacheBuild->handle();
$this->assertArrayHasKey('status', $callHostingSubscriptionStoreResponse);
$this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok');

View file

@ -2,6 +2,7 @@
namespace Tests\Unit;
use App\Jobs\ApacheBuild;
use App\Models\HostingPlan;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Str;
@ -82,6 +83,9 @@ class MWHSCreateTest extends ActionTestCase
'domain' => $hostingSubscriptionDomain,
])->json();
$apacheBuild = new ApacheBuild();
$apacheBuild->handle();
if (!isset($callHostingSubscriptionStoreResponse['status'])) {
$this->fail(json_encode($callHostingSubscriptionStoreResponse));
}

View file

@ -2,6 +2,7 @@
namespace Tests\Unit;
use App\Jobs\ApacheBuild;
use Faker\Factory;
use Tests\Feature\Api\ActionTestCase;
@ -110,6 +111,10 @@ class SecurityTest extends ActionTestCase
'domain' => 'phyre-unit-test-'.$randId.'.com',
]
)->json();
$apacheBuild = new ApacheBuild();
$apacheBuild->handle();
$this->assertArrayHasKey('status', $callHostingSubscriptionStoreResponse);
$this->assertTrue($callHostingSubscriptionStoreResponse['status'] == 'ok');
$secondHostingSubscription = $callHostingSubscriptionStoreResponse['data']['hostingSubscription'];