Skip to content

Commit

Permalink
fixes fixture
Browse files Browse the repository at this point in the history
  • Loading branch information
pcrespov committed Oct 31, 2024
1 parent 5efe92e commit e1d9437
Showing 1 changed file with 28 additions and 24 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
from models_library.generated_models.docker_rest_api import (
Resources1 as ServiceTaskResources,
)
from models_library.generated_models.docker_rest_api import ServiceSpec
from models_library.generated_models.docker_rest_api import ServiceSpec, TaskSpec
from models_library.products import ProductName
from models_library.users import UserID
from simcore_postgres_database.models.groups import user_to_groups
Expand Down Expand Up @@ -91,29 +91,33 @@ def _creator(service_key, service_version, gid) -> ServiceSpecificationsAtDB:
service_key=service_key,
service_version=service_version,
gid=gid,
sidecar=ServiceSpec(Labels=faker.pydict(allowed_types=(str,))), # type: ignore
service=ServiceTaskResources(
Limits=Limit(
NanoCPUs=faker.pyint(),
MemoryBytes=faker.pyint(),
Pids=faker.pyint(),
),
Reservations=ResourceObject(
NanoCPUs=faker.pyint(),
MemoryBytes=faker.pyint(),
GenericResources=GenericResources(
root=[
GenericResource(
NamedResourceSpec=NamedResourceSpec(
Kind=faker.pystr(), Value=faker.pystr()
),
DiscreteResourceSpec=DiscreteResourceSpec(
Kind=faker.pystr(), Value=faker.pyint()
),
)
]
),
),
sidecar=ServiceSpec(Labels=faker.pydict(allowed_types=(str,))),
service=ServiceSpec(
TaskTemplate=TaskSpec(
Resources=ServiceTaskResources(
Limits=Limit(
NanoCPUs=faker.pyint(),
MemoryBytes=faker.pyint(),
Pids=faker.pyint(),
),
Reservations=ResourceObject(
NanoCPUs=faker.pyint(),
MemoryBytes=faker.pyint(),
GenericResources=GenericResources(
root=[
GenericResource(
NamedResourceSpec=NamedResourceSpec(
Kind=faker.pystr(), Value=faker.pystr()
),
DiscreteResourceSpec=DiscreteResourceSpec(
Kind=faker.pystr(), Value=faker.pyint()
),
)
]
),
),
)
)
),
)

Expand Down

0 comments on commit e1d9437

Please sign in to comment.