refs #1480. Fixed test
testing/ogcore-api/pipeline/head This commit looks good Details

hotfix-timeout
Manuel Aranda Rosales 2025-02-10 08:15:20 +01:00
parent d5c75f6c45
commit 81bb1c5268
3 changed files with 18 additions and 5 deletions

View File

@ -132,9 +132,10 @@ final class ImageInput
foreach ($this->imageRepositories as $repository) {
$repositoriesToAdd[] = $repository->getEntity();
}
} else {
$repositoriesToAdd[] = $image->getClient()?->getRepository();
}
$repositoriesToAdd[] = $image->getClient()?->getRepository();
$image->setRepositories( $repositoriesToAdd ?? [] );
$image->setRemotePc($this->remotePc);

View File

@ -191,7 +191,7 @@ class Image extends AbstractEntity
return $this->repositories;
}
public function setRepositories(?array $repositories = []): static
public function setRepositories(array $repositories): static
{
$this->repositories->clear();
@ -202,7 +202,7 @@ class Image extends AbstractEntity
return $this;
}
public function addRepository(?\App\Entity\ImageRepository $repository): static
public function addRepository(\App\Entity\ImageRepository $repository): static
{
if (!$this->repositories->contains($repository)) {
$this->repositories->add($repository);

View File

@ -56,7 +56,13 @@ class ImageTest extends AbstractTest
}
/*
/**
* @throws RedirectionExceptionInterface
* @throws DecodingExceptionInterface
* @throws ClientExceptionInterface
* @throws TransportExceptionInterface
* @throws ServerExceptionInterface
*/
public function testCreateImage(): void
{
UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
@ -82,6 +88,13 @@ class ImageTest extends AbstractTest
}
/**
* @throws RedirectionExceptionInterface
* @throws DecodingExceptionInterface
* @throws ClientExceptionInterface
* @throws TransportExceptionInterface
* @throws ServerExceptionInterface
*/
public function testUpdateImage(): void
{
UserFactory::createOne(['username' => self::USER_ADMIN, 'roles'=> [UserGroupPermissions::ROLE_SUPER_ADMIN]]);
@ -102,7 +115,6 @@ class ImageTest extends AbstractTest
'name' => self::IMAGE_UPDATE,
]);
}
*/
/**
* @throws TransportExceptionInterface