mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-25 00:50:32 +00:00
update
This commit is contained in:
parent
3062f0215c
commit
4e45e3299f
6 changed files with 20 additions and 19 deletions
|
@ -21,7 +21,7 @@ steps:
|
||||||
- COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install
|
- COMPOSER_ALLOW_SUPERUSER=1 phyre-php composer.phar install
|
||||||
- phyre-php artisan phyre:set-ini-settings APP_ENV "local"
|
- phyre-php artisan phyre:set-ini-settings APP_ENV "local"
|
||||||
- phyre-php artisan migrate
|
- phyre-php artisan migrate
|
||||||
- phyre-php artisan test --filter AutoInstallPanelTest
|
- phyre-php artisan test
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
name: Ubuntu 22.04 - Unit Test & Code Coverage
|
name: Ubuntu 22.04 - Unit Test & Code Coverage
|
||||||
|
|
|
@ -25,10 +25,11 @@ class HostingSubscriptionBackupTest extends ActionTestCase
|
||||||
{
|
{
|
||||||
public function testFullBackup()
|
public function testFullBackup()
|
||||||
{
|
{
|
||||||
|
|
||||||
ini_set('memory_limit', '-1');
|
ini_set('memory_limit', '-1');
|
||||||
ini_set('max_execution_time', 0);
|
ini_set('max_execution_time', 0);
|
||||||
|
|
||||||
Queue::fake();
|
// Queue::fake();
|
||||||
|
|
||||||
$chs = $this->_createHostingSubscription();
|
$chs = $this->_createHostingSubscription();
|
||||||
|
|
||||||
|
@ -37,6 +38,7 @@ class HostingSubscriptionBackupTest extends ActionTestCase
|
||||||
$newBackup->hosting_subscription_id = $chs['hostingSubscriptionId'];
|
$newBackup->hosting_subscription_id = $chs['hostingSubscriptionId'];
|
||||||
$newBackup->save();
|
$newBackup->save();
|
||||||
|
|
||||||
|
|
||||||
$phsb = new ProcessHostingSubscriptionBackup($newBackup->id);
|
$phsb = new ProcessHostingSubscriptionBackup($newBackup->id);
|
||||||
$phsb->handle();
|
$phsb->handle();
|
||||||
|
|
||||||
|
|
|
@ -15,7 +15,7 @@ use Tests\Feature\Api\ActionTestCase;
|
||||||
|
|
||||||
class HostingSubscriptionCreateTest extends ActionTestCase
|
class HostingSubscriptionCreateTest extends ActionTestCase
|
||||||
{
|
{
|
||||||
function test_route_contains_middleware()
|
function testRouteContainsMiddleware()
|
||||||
{
|
{
|
||||||
$this->assertRouteContainsMiddleware(
|
$this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.index',
|
'api.hosting-subscriptions.index',
|
||||||
|
|
|
@ -18,7 +18,7 @@ use Tests\Feature\Api\ActionTestCase;
|
||||||
|
|
||||||
class HostingSubscriptionWithNodeJSCreateTest extends ActionTestCase
|
class HostingSubscriptionWithNodeJSCreateTest extends ActionTestCase
|
||||||
{
|
{
|
||||||
function test_route_contains_middleware()
|
function testRouteContainsMiddleware()
|
||||||
{
|
{
|
||||||
$this->assertRouteContainsMiddleware(
|
$this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.index',
|
'api.hosting-subscriptions.index',
|
||||||
|
@ -29,23 +29,22 @@ class HostingSubscriptionWithNodeJSCreateTest extends ActionTestCase
|
||||||
'api.hosting-subscriptions.store',
|
'api.hosting-subscriptions.store',
|
||||||
ApiKeyMiddleware::class
|
ApiKeyMiddleware::class
|
||||||
);
|
);
|
||||||
|
//
|
||||||
$this->assertRouteContainsMiddleware(
|
// $this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.update',
|
// 'api.hosting-subscriptions.update',
|
||||||
ApiKeyMiddleware::class
|
// ApiKeyMiddleware::class
|
||||||
);
|
// );
|
||||||
|
//
|
||||||
$this->assertRouteContainsMiddleware(
|
// $this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.destroy',
|
// 'api.hosting-subscriptions.destroy',
|
||||||
ApiKeyMiddleware::class
|
// ApiKeyMiddleware::class
|
||||||
);
|
// );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_create()
|
function testCreate()
|
||||||
{
|
{
|
||||||
$this->assertTrue(Str::contains(php_uname(),'Ubuntu'));
|
$this->assertTrue(Str::contains(php_uname(),'Ubuntu'));
|
||||||
//
|
|
||||||
|
|
||||||
$isNodeJsInstalled = false;
|
$isNodeJsInstalled = false;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ use Tests\Feature\Api\ActionTestCase;
|
||||||
|
|
||||||
class HostingSubscriptionWithPythonCreateTest extends ActionTestCase
|
class HostingSubscriptionWithPythonCreateTest extends ActionTestCase
|
||||||
{
|
{
|
||||||
function test_route_contains_middleware()
|
function testRouteContainsMiddleware()
|
||||||
{
|
{
|
||||||
$this->assertRouteContainsMiddleware(
|
$this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.index',
|
'api.hosting-subscriptions.index',
|
||||||
|
|
|
@ -9,7 +9,7 @@ use Tests\Feature\Api\ActionTestCase;
|
||||||
class HostingSubscriptionsTest extends ActionTestCase
|
class HostingSubscriptionsTest extends ActionTestCase
|
||||||
{
|
{
|
||||||
|
|
||||||
function test_route_contains_middleware()
|
function testRouteContainsMiddleware()
|
||||||
{
|
{
|
||||||
$this->assertRouteContainsMiddleware(
|
$this->assertRouteContainsMiddleware(
|
||||||
'api.hosting-subscriptions.index',
|
'api.hosting-subscriptions.index',
|
||||||
|
@ -29,7 +29,7 @@ class HostingSubscriptionsTest extends ActionTestCase
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
function test_index()
|
function testIndex()
|
||||||
{
|
{
|
||||||
// Make unauthorized call
|
// Make unauthorized call
|
||||||
$callUnauthorizedResponse = $this->callRouteAction('api.hosting-subscriptions.index')->json();
|
$callUnauthorizedResponse = $this->callRouteAction('api.hosting-subscriptions.index')->json();
|
||||||
|
|
Loading…
Reference in a new issue