Skip to content

Commit

Permalink
Fix PR
Browse files Browse the repository at this point in the history
  • Loading branch information
moshemorad committed Nov 10, 2024
1 parent 9a0fe40 commit b57084b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions tests/models/test_resource_allocations.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
from typing import Union

import pytest

from robusta_krr.core.models.allocations import ResourceAllocations, ResourceType


Expand All @@ -13,15 +16,15 @@
"memory",
[
{"request": 128974848, "limit": 128974848},
{"request": "128.974848e6", "limit": 128.974848e6},
{"request": 128.974848e6, "limit": 128.974848e6},
{"request": "128.9748480M", "limit": "128.9748480M"},
{"request": "128974848000m", "limit": "128974848000m"},
{"request": "123Mi", "limit": "123Mi"},
{"request": "128974848e0", "limit": "128974848e0"},
],
)
def test_resource_allocation_supported_formats(
cpu: dict[str, str | None] | dict[str, float | None], memory: dict[str, int] | dict[str, float] | dict[str, str]
cpu: dict[str, Union[str, int, float, None]], memory: dict[str, Union[str, int, float, None]]
):
allocations = ResourceAllocations(
requests={ResourceType.CPU: cpu["request"], ResourceType.Memory: memory["request"]},
Expand Down

0 comments on commit b57084b

Please sign in to comment.