Exemplo n.º 1
0
 def test_collector_without_connections(self):
     artifacts = collect_io_artifacts(
         compiled_operation=self.compiled_operation, connection_by_names={}
     )
     assert len(artifacts) == 3
     assert {a.is_input for a in artifacts} == {True, False}
     assert {a.kind for a in artifacts} == {V1ArtifactKind.DOCKER_IMAGE}
     assert {a.connection for a in artifacts} == {"connection1", "connection2"}
     assert {a.summary.get("image") for a in artifacts} == {
         "repo1",
         "repo2",
         "repo3",
     }
Exemplo n.º 2
0
def resolve_artifacts_lineage(
    owner_name: str,
    project_name: str,
    project_uuid: str,
    run_uuid: str,
    run_name: str,
    run_path: str,
    param_spec: Dict[str, ParamSpec],
    compiled_operation: V1CompiledOperation,
    artifacts_store: V1ConnectionType,
    connection_by_names: Dict[str, V1ConnectionType],
) -> List[V1RunArtifact]:
    return collect_io_artifacts(compiled_operation=compiled_operation,
                                connection_by_names=connection_by_names)
Exemplo n.º 3
0
 def test_collector_with_connections(self):
     connection1 = V1ConnectionType(
         name="connection1",
         kind=V1ConnectionKind.REGISTRY,
         schema=V1HostConnection(url="localhost:5000"),
         secret="test",
     )
     artifacts = collect_io_artifacts(
         compiled_operation=self.compiled_operation,
         connection_by_names={"connection1": connection1},
     )
     assert len(artifacts) == 3
     assert {a.is_input for a in artifacts} == {True, False}
     assert {a.kind for a in artifacts} == {V1ArtifactKind.DOCKER_IMAGE}
     assert {a.connection for a in artifacts} == {"connection1", "connection2"}
     assert {a.summary.get("image") for a in artifacts} == {
         "localhost:5000/repo1",
         "repo2",
         "localhost:5000/repo3",
     }