File tree Expand file tree Collapse file tree 2 files changed +1
-24
lines changed
services/director-v2/tests/unit Expand file tree Collapse file tree 2 files changed +1
-24
lines changed Original file line number Diff line number Diff line change 6
6
Worker ,
7
7
WorkerMetrics ,
8
8
)
9
- from models_library .clusters import ClusterTypeInModel
10
9
from pydantic import ByteSize , TypeAdapter
11
- from simcore_postgres_database .models .clusters import ClusterType
12
10
13
11
14
12
def test_scheduler_constructor_with_default_has_correct_dict (faker : Faker ):
@@ -41,23 +39,3 @@ def test_worker_constructor_corrects_negative_used_resources(faker: Faker):
41
39
)
42
40
assert worker
43
41
assert worker .used_resources ["CPU" ] == 0
44
-
45
-
46
- def test_cluster_type_in_model_includes_postgres_database_model ():
47
- models_library_cluster_types_names : set [str ] = {
48
- t .name for t in set (ClusterTypeInModel )
49
- }
50
- postgres_library_cluster_types_names : set [str ] = {t .name for t in set (ClusterType )}
51
- assert postgres_library_cluster_types_names .issubset (
52
- models_library_cluster_types_names
53
- )
54
-
55
- models_library_cluster_types_values : set [str ] = {
56
- t .value for t in set (ClusterTypeInModel )
57
- } # type: ignore
58
- postgres_library_cluster_types_values : set [str ] = {
59
- t .value for t in set (ClusterType )
60
- }
61
- assert postgres_library_cluster_types_values .issubset (
62
- models_library_cluster_types_values
63
- )
Original file line number Diff line number Diff line change 22
22
)
23
23
from pytest_mock .plugin import MockerFixture
24
24
from pytest_simcore .helpers .typing_env import EnvVarsDict
25
- from simcore_postgres_database .models .clusters import ClusterType
26
25
from simcore_service_director_v2 .core .application import init_app
27
26
from simcore_service_director_v2 .core .errors import (
28
27
ConfigurationError ,
@@ -86,7 +85,7 @@ def creator(num_clusters: int) -> list[BaseCluster]:
86
85
{
87
86
"id" : faker .pyint (),
88
87
"name" : faker .name (),
89
- "type" : ClusterType .ON_PREMISE ,
88
+ "type" : ClusterTypeInModel .ON_PREMISE ,
90
89
"owner" : faker .pyint (),
91
90
"endpoint" : faker .uri (),
92
91
"authentication" : choice ( # noqa: S311
You can’t perform that action at this time.
0 commit comments