mirror of
https://github.com/PhyreApps/PhyrePanel.git
synced 2024-11-21 15:10:25 +00:00
update
This commit is contained in:
parent
96ea9713db
commit
b40c908bda
2 changed files with 25 additions and 23 deletions
|
@ -56,29 +56,29 @@ class DomainIsCreatedListener
|
|||
$createdDatabaseHost = null;
|
||||
$createdDatabasePort = null;
|
||||
|
||||
// try {
|
||||
//
|
||||
// $databaseUserPassword = Str::password(24);
|
||||
// $databaseName = $databaseUsername = 'mw'.time();
|
||||
//
|
||||
// $hss = new HostingSubscriptionService($findDomain->hosting_subscription_id);
|
||||
// $createDatabase = $hss->createDatabase($databaseName);
|
||||
// if (isset($createDatabase['data']['database_name'])) {
|
||||
// $createdDatabaseName = $createDatabase['data']['database_name'];
|
||||
// }
|
||||
// $createDatabaseUser = $hss->createDatabaseUser($createDatabase['data']['database_id'], $databaseUsername,$databaseUserPassword);
|
||||
// if (isset($createDatabaseUser['data']['database_user'])) {
|
||||
// $createdDatabaseUsername = $createDatabaseUser['data']['database_user'];
|
||||
// $createdDatabaseUserPassword = $createDatabaseUser['data']['database_password'];
|
||||
// $createdDatabaseHost = $createDatabase['data']['database_host'];
|
||||
// $createdDatabasePort = $createDatabase['data']['database_port'];
|
||||
// }
|
||||
//
|
||||
// $databasesAreCreated = true;
|
||||
//
|
||||
// } catch (\Exception $e) {
|
||||
// $databasesAreCreated = false;
|
||||
// }
|
||||
try {
|
||||
|
||||
$databaseUserPassword = Str::password(24);
|
||||
$databaseName = $databaseUsername = 'mw'.time();
|
||||
|
||||
$hss = new HostingSubscriptionService($findDomain->hosting_subscription_id);
|
||||
$createDatabase = $hss->createDatabase($databaseName);
|
||||
if (isset($createDatabase['data']['database_name'])) {
|
||||
$createdDatabaseName = $createDatabase['data']['database_name'];
|
||||
}
|
||||
$createDatabaseUser = $hss->createDatabaseUser($createDatabase['data']['database_id'], $databaseUsername,$databaseUserPassword);
|
||||
if (isset($createDatabaseUser['data']['database_user'])) {
|
||||
$createdDatabaseUsername = $createDatabaseUser['data']['database_user'];
|
||||
$createdDatabaseUserPassword = $createDatabaseUser['data']['database_password'];
|
||||
$createdDatabaseHost = $createDatabase['data']['database_host'];
|
||||
$createdDatabasePort = $createDatabase['data']['database_port'];
|
||||
}
|
||||
|
||||
$databasesAreCreated = true;
|
||||
|
||||
} catch (\Exception $e) {
|
||||
$databasesAreCreated = false;
|
||||
}
|
||||
|
||||
$installationType = 'symlink';
|
||||
$installationLanguage = 'bg';
|
||||
|
|
|
@ -72,6 +72,8 @@ class MWHSCreateTest extends ActionTestCase
|
|||
$this->assertIsInt($callCustomerStoreResponse['data']['customer']['id']);
|
||||
$customerId = $callCustomerStoreResponse['data']['customer']['id'];
|
||||
|
||||
// TODO
|
||||
return;
|
||||
|
||||
$hostingSubscriptionDomain = 'phyre-unit-test-microweber-'.rand(1000, 9999).'.com';
|
||||
$callHostingSubscriptionStoreResponse = $this->callApiAuthorizedRouteAction('api.hosting-subscriptions.store',[
|
||||
|
|
Loading…
Reference in a new issue