Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: add test for missing child node #12214

Merged
merged 1 commit into from
Nov 17, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 72 additions & 0 deletions test/e2e/functional/missing-steps.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
name: missing-steps
spec:
entrypoint: main
templates:
- name: main
steps:
- - arguments:
parameters:
- name: script
value: |
echo hello
name: step1
template: work
- - arguments:
parameters:
- name: script
value: |
echo world
name: step2
template: work
- name: work
inputs:
parameters:
- name: script
- name: outputArtifactResultFilePath
default: /tmp/output
artifacts:
- name: inputFile
optional: true
outputs:
parameters:
- name: result
valueFrom:
parameter: '{{steps.execute-script.outputs.result}}'
artifacts:
- name: resultFile
optional: true
from: '{{steps.execute-script.outputs.artifacts.resultFile}}'
steps:
- - name: execute-script
template: execute-target-script
arguments:
parameters:
- name: script
value: '{{inputs.parameters.script}}'
- name: outputArtifactResultFilePath
value: '{{inputs.parameters.outputArtifactResultFilePath}}'
artifacts:
- name: inputFile
from: '{{inputs.artifacts.inputFile}}'
- name: execute-target-script
inputs:
parameters:
- name: script
- name: outputArtifactResultFilePath
default: /tmp/output
artifacts:
- name: inputFile
optional: true
path: /tmp/inputFile
outputs:
artifacts:
- name: resultFile
optional: true
path: '{{inputs.parameters.outputArtifactResultFilePath}}'
script:
command: [ 'bash' ]
image: 'argoproj/argosay:v2'
source: '{{inputs.parameters.script}}'
14 changes: 14 additions & 0 deletions test/e2e/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1200,3 +1200,17 @@ func (s *FunctionalSuite) TestEntrypointName() {
})

}

func (s *FunctionalSuite) TestMissingStepsInUI() {
s.Given().
Workflow(`@functional/missing-steps.yaml`).
When().
SubmitWorkflow().
WaitForWorkflow(fixtures.ToBeSucceeded).
Then().
ExpectWorkflowNode(wfv1.NodeWithName(`missing-steps[0].step1[0].execute-script`), func(t *testing.T, n *wfv1.NodeStatus, _ *apiv1.Pod) {
assert.NotNil(t, n)
assert.NotNil(t, n.Children)
assert.Equal(t, 1, len(n.Children))
})
}