@@ -3344,72 +3344,3 @@ func TestShouldCheckValidationToSpacedParameters(t *testing.T) {
3344
3344
// Do not allow leading or trailing spaces in parameters
3345
3345
require .ErrorContains (t , err , "failed to resolve {{ workflow.thisdoesnotexist }}" )
3346
3346
}
3347
-
3348
- var dynamicWorkflowTemplateARefB = `
3349
- apiVersion: argoproj.io/v1alpha1
3350
- kind: WorkflowTemplate
3351
- metadata:
3352
- name: workflow-template-a
3353
- spec:
3354
- templates:
3355
- - name: template-a
3356
- inputs:
3357
- parameters:
3358
- - name: message
3359
- steps:
3360
- - - name: step-a
3361
- templateRef:
3362
- name: workflow-template-b
3363
- template: "{{ inputs.parameters.message }}"
3364
- `
3365
-
3366
- var dynamicWorkflowTemplateRefB = `
3367
- apiVersion: argoproj.io/v1alpha1
3368
- kind: WorkflowTemplate
3369
- metadata:
3370
- name: workflow-template-b
3371
- spec:
3372
- templates:
3373
- - name: template-b
3374
- container:
3375
- image: docker/whalesay
3376
- command: [cowsay]
3377
- args: ["hello from template"]
3378
- `
3379
-
3380
- var dynamicTemplateRefWorkflow = `
3381
- apiVersion: argoproj.io/v1alpha1
3382
- kind: Workflow
3383
- metadata:
3384
- generateName: dynamic-workflow-
3385
- spec:
3386
- entrypoint: whalesay
3387
- templates:
3388
- - name: whalesay
3389
- steps:
3390
- - - name: whalesay
3391
- templateRef:
3392
- name: workflow-template-a
3393
- template: template-a
3394
- arguments:
3395
- parameters:
3396
- - name: message
3397
- value: "template-b"
3398
- `
3399
-
3400
- func TestDynamicWorkflowTemplateRef (t * testing.T ) {
3401
- wf := wfv1 .MustUnmarshalWorkflow (dynamicTemplateRefWorkflow )
3402
- wftmplA := wfv1 .MustUnmarshalWorkflowTemplate (dynamicWorkflowTemplateARefB )
3403
- wftmplB := wfv1 .MustUnmarshalWorkflowTemplate (dynamicWorkflowTemplateRefB )
3404
-
3405
- err := createWorkflowTemplate (wftmplA )
3406
- require .NoError (t , err )
3407
- err = createWorkflowTemplate (wftmplB )
3408
- require .NoError (t , err )
3409
-
3410
- err = ValidateWorkflow (wftmplGetter , cwftmplGetter , wf , ValidateOpts {})
3411
- require .NoError (t , err )
3412
-
3413
- _ = deleteWorkflowTemplate (wftmplA .Name )
3414
- _ = deleteWorkflowTemplate (wftmplB .Name )
3415
- }
0 commit comments