Complete base implementation of services for administrative server creation

This commit is contained in:
Dane Everitt 2017-07-24 21:34:10 -05:00
parent f842aae3d3
commit 8daec38622
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
22 changed files with 633 additions and 141 deletions

View file

@ -152,7 +152,7 @@ class CreationServiceTest extends TestCase
'node_id' => 1,
'name' => 'SomeName',
'description' => null,
'user_id' => 1,
'owner_id' => 1,
'memory' => 128,
'disk' => 128,
'swap' => 0,
@ -169,7 +169,7 @@ class CreationServiceTest extends TestCase
'docker_image' => 'some/image',
];
$this->validatorService->shouldReceive('setAdmin')->withNoArgs()->once()->andReturnSelf()
$this->validatorService->shouldReceive('isAdmin')->withNoArgs()->once()->andReturnSelf()
->shouldReceive('setFields')->with($data['environment'])->once()->andReturnSelf()
->shouldReceive('validate')->with($data['option_id'])->once()->andReturnSelf();
@ -187,7 +187,7 @@ class CreationServiceTest extends TestCase
'description' => $data['description'],
'skip_scripts' => false,
'suspended' => false,
'owner_id' => $data['user_id'],
'owner_id' => $data['owner_id'],
'memory' => $data['memory'],
'swap' => $data['swap'],
'disk' => $data['disk'],

View file

@ -110,7 +110,7 @@ class VariableValidatorServiceTest extends TestCase
*/
public function testSettingAdminShouldReturnInstanceOfSelf()
{
$response = $this->service->setAdmin();
$response = $this->service->isAdmin();
$this->assertInstanceOf(VariableValidatorService::class, $response);
}
@ -187,7 +187,7 @@ class VariableValidatorServiceTest extends TestCase
->shouldReceive('fails')->withNoArgs()->once()->andReturn(false);
}
$response = $this->service->setAdmin()->setFields([
$response = $this->service->isAdmin()->setFields([
$this->variables{0}->env_variable => 'Test_SomeValue_0',
$this->variables{1}->env_variable => 'Test_SomeValue_1',
$this->variables{2}->env_variable => 'Test_SomeValue_2',