-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: isubasinghe <isitha@pipekit.io>
- Loading branch information
1 parent
44d748f
commit de570d3
Showing
1 changed file
with
67 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
//go:build functional | ||
// +build functional | ||
|
||
package e2e | ||
|
||
import ( | ||
"strings" | ||
"testing" | ||
|
||
"github.com/argoproj/argo-workflows/v3/test/e2e/fixtures" | ||
"github.com/stretchr/testify/suite" | ||
"gotest.tools/v3/assert" | ||
v1 "k8s.io/client-go/applyconfigurations/meta/v1" | ||
) | ||
|
||
type ExprSuite struct { | ||
fixtures.E2ESuite | ||
} | ||
|
||
func (s *ExprSuite) TestRegression12037() { | ||
s.Given(). | ||
Workflow(`apiVersion: argoproj.io/v1alpha1 | ||
kind: Workflow | ||
metadata: | ||
generateName: broken- | ||
spec: | ||
entrypoint: main | ||
templates: | ||
- name: main | ||
dag: | ||
tasks: | ||
- name: split | ||
template: foo | ||
- name: map | ||
template: foo | ||
depends: split | ||
- name: foo | ||
container: | ||
image: alpine | ||
command: | ||
- sh | ||
- -c | ||
- | | ||
echo "foo" | ||
`).When(). | ||
SubmitWorkflow(). | ||
WaitForWorkflow(fixtures.ToBeSucceeded). | ||
Then(). | ||
ExpectWorkflow(func(t *testing.T, metadata *v1.ObjectMeta, status *v1alpha1.WorkflowStatus) { | ||
Check failure on line 50 in test/e2e/expr_lang.go GitHub Actions / Lint
|
||
assert.Equal(t, status.Phase, v1alpha1.WorkflowSuceeded) | ||
}). | ||
ExpectWorkflowNode(func(status v1alpha1.nodeStatus) bool { | ||
return strings.Contains(status.name, ".split") | ||
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) { | ||
Check failure on line 55 in test/e2e/expr_lang.go GitHub Actions / Lint
|
||
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase) | ||
}). | ||
ExpectWorkflowNode(func(status v1alpha1.nodeStatus) bool { | ||
return strings.Contains(status.name, ".map") | ||
}, func(t *testing.T, status *v1alpha1.NodeStatus, pod *apiv1.Pod) { | ||
Check failure on line 60 in test/e2e/expr_lang.go GitHub Actions / Lint
|
||
assert.Equal(t, v1alpha1.NodeSucceeded, status.Phase) | ||
}) | ||
} | ||
|
||
func TestExprLangSSuite(t *testing.T) { | ||
suite.Run(t, new(ExprSuite)) | ||
} |