@@ -735,7 +735,7 @@ def test_generate_pipeline_dsl_compile_pipeline_dsl_one_generic_node_pipeline_te
735735
736736 # Verify component definition information (see generic_component_definition_template.jinja2)
737737 # - property 'name'
738- assert node_template ["name" ] == "run-a-file"
738+ assert node_template ["name" ] == sanitize_label_value ( op . name )
739739 # - property 'implementation.container.command'
740740 assert node_template ["container" ]["command" ] == ["sh" , "-c" ]
741741 # - property 'implementation.container.args'
@@ -1416,11 +1416,9 @@ def test_generate_pipeline_dsl_compile_pipeline_dsl_generic_components_data_exch
14161416 assert len (compiled_spec ["spec" ]["templates" ]) >= 3
14171417 template_specs = {}
14181418 for node_template in compiled_spec ["spec" ]["templates" ]:
1419- if node_template ["name" ] == compiled_spec ["spec" ]["entrypoint" ] or not node_template ["name" ].startswith (
1420- "run-a-file"
1421- ):
1419+ if node_template ["name" ] == compiled_spec ["spec" ]["entrypoint" ]:
14221420 continue
1423- template_specs [node_template ["name" ]] = node_template
1421+ template_specs [sanitize_label_value ( node_template ["name" ]) ] = node_template
14241422
14251423 # Iterate through sorted operations and verify that their inputs
14261424 # and outputs are properly represented in their respective template
@@ -1430,10 +1428,8 @@ def test_generate_pipeline_dsl_compile_pipeline_dsl_generic_components_data_exch
14301428 if not op .is_generic :
14311429 # ignore custom nodes
14321430 continue
1433- if template_index == 1 :
1434- template_name = "run-a-file"
1435- else :
1436- template_name = f"run-a-file-{ template_index } "
1431+ template_name = sanitize_label_value (op .name )
1432+ template_name = template_name .replace ("_" , "-" ) # kubernetes does this replace
14371433 template_index = template_index + 1
14381434 # compare outputs
14391435 if len (op .outputs ) > 0 :
0 commit comments