Fixed conflicts and solved DTO bugs
testing/ogcore-api/pipeline/head There was a failure building this commit Details

develop-jenkins
Manuel Aranda Rosales 2024-09-30 11:37:36 +02:00
parent 4cfa700e91
commit 4f1bfa04f6
5 changed files with 13 additions and 25 deletions

View File

@ -8,7 +8,6 @@ services:
api_platform.filter.client.search:
parent: 'api_platform.doctrine.orm.search_filter'
<<<<<<< HEAD
arguments: [ { 'id': 'exact', 'name': 'partial', 'serialNumber': 'exact', organizationalUnit.id: 'exact', mac: 'exact', ip: 'exact' } ]
tags: [ 'api_platform.filter' ]
@ -27,9 +26,6 @@ services:
api_platform.filter.command.boolean:
parent: 'api_platform.doctrine.orm.boolean_filter'
arguments: [ { 'enabled': ~ } ]
=======
arguments: [ { 'id': 'exact', 'name': 'partial', 'serialNumber': 'exact', organizationalUnit.id: 'exact', 'ip': exact, 'mac': exact } ]
>>>>>>> feature/integration-ogboot
tags: [ 'api_platform.filter' ]
api_platform.filter.hardware.order:

View File

@ -13,27 +13,16 @@ final class ClientOutput extends AbstractOutput
{
CONST string TYPE = 'client';
<<<<<<< HEAD
#[Groups(['client:read', 'organizational-unit:read', 'trace:read'])]
=======
#[Groups(['client:read', 'organizational-unit:read', 'pxe-boot-file:read'])]
>>>>>>> feature/integration-ogboot
#[Groups(['client:read', 'organizational-unit:read', 'pxe-boot-file:read', 'trace:read'])]
public string $name;
#[Groups(['client:read', 'organizational-unit:read'])]
public string $type = self::TYPE;
<<<<<<< HEAD
#[Groups(['client:read', 'organizational-unit:read', 'trace:read'])]
public ?string $ip = '';
#[Groups(['client:read', 'organizational-unit:read', 'trace:read'])]
=======
#[Groups(['client:read', 'organizational-unit:read', 'pxe-boot-file:read'])]
#[Groups(['client:read', 'organizational-unit:read', 'pxe-boot-file:read', 'trace:read'])]
public ?string $ip = '';
#[Groups(['client:read', 'organizational-unit:read', 'pxe-boot-file:read'])]
>>>>>>> feature/integration-ogboot
public ?string $mac = '';
#[Groups(['client:read', 'organizational-unit:read', 'trace:read'])]

View File

@ -64,11 +64,9 @@ class Client extends AbstractEntity
private ?OgRepository $repository = null;
#[ORM\ManyToOne(inversedBy: 'clients')]
<<<<<<< HEAD
private ?Subnet $subnet = null;
=======
#[ORM\ManyToOne(inversedBy: 'clients')]
private ?OgLive $ogLive = null;
>>>>>>> feature/integration-ogboot
public function __construct()
{
@ -262,7 +260,6 @@ class Client extends AbstractEntity
return $this;
}
<<<<<<< HEAD
public function getSubnet(): ?Subnet
{
return $this->subnet;
@ -271,7 +268,10 @@ class Client extends AbstractEntity
public function setSubnet(?Subnet $subnet): static
{
$this->subnet = $subnet;
=======
return $this;
}
public function getOgLive(): ?OgLive
{
return $this->ogLive;
@ -280,7 +280,6 @@ class Client extends AbstractEntity
public function setOgLive(?OgLive $ogLive): static
{
$this->ogLive = $ogLive;
>>>>>>> feature/integration-ogboot
return $this;
}

View File

@ -3,6 +3,7 @@
namespace App\Factory;
use App\Entity\OgLive;
use App\Model\OgLiveStatus;
use App\Repository\OgLiveRepository;
use Zenstruck\Foundry\ModelFactory;
use Zenstruck\Foundry\Persistence\PersistentProxyObjectFactory;
@ -35,6 +36,7 @@ final class OgLiveFactory extends ModelFactory
'createdAt' => self::faker()->dateTime(),
'name' => self::faker()->text(255),
'downloadUrl' => self::faker()->text(255),
'status' => OgLiveStatus::ACTIVE,
'updatedAt' => self::faker()->dateTime(),
];
}

View File

@ -9,6 +9,7 @@ use App\Entity\User;
use App\Factory\HardwareProfileFactory;
use App\Factory\OgLiveFactory;
use App\Factory\UserFactory;
use App\Model\OgLiveStatus;
use App\Model\UserGroupPermissions;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Contracts\HttpClient\Exception\ClientExceptionInterface;
@ -61,7 +62,7 @@ class OgLiveTest extends AbstractTest
$this->createClientWithCredentials()->request('POST', '/og-lives',['json' => [
'name' => self::OGLIVE_CREATE,
'downloadUrl' => 'http://example.com'
'downloadUrl' => 'http://example.com',
]]);
$this->assertResponseStatusCodeSame(201);
@ -70,7 +71,8 @@ class OgLiveTest extends AbstractTest
'@context' => '/contexts/OgLiveOutput',
'@type' => 'OgLive',
'name' => self::OGLIVE_CREATE,
'downloadUrl' => 'http://example.com'
'downloadUrl' => 'http://example.com',
'status' => OgLiveStatus::INACTIVE
]);
}