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

chore: Tidy up test/verification #5209

Merged
merged 2 commits into from
Feb 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
18 changes: 0 additions & 18 deletions test/e2e/functional/k8s-patch.yaml

This file was deleted.

12 changes: 0 additions & 12 deletions test/e2e/functional_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -792,18 +792,6 @@ spec:
})
}

func (s *FunctionalSuite) TestK8SJSONPatch() {
s.Given().
Workflow("@functional/k8s-patch.yaml").
When().
SubmitWorkflow().
WaitForWorkflow().
Then().
ExpectWorkflow(func(t *testing.T, metadata *metav1.ObjectMeta, status *wfv1.WorkflowStatus) {
assert.Equal(t, wfv1.WorkflowSucceeded, status.Phase)
})
}

func (s *FunctionalSuite) TestWorkflowPodSpecPatch() {
s.Given().
Workflow(`apiVersion: argoproj.io/v1alpha1
Expand Down
8 changes: 6 additions & 2 deletions workflow/verify/verifier.go
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
package verify

import (
"fmt"

_ "github.com/go-python/gpython/builtin"

"github.com/argoproj/argo-workflows/v3/pkg/apis/workflow"
wfv1 "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
"github.com/argoproj/argo-workflows/v3/util/python"
)

const annotationName = workflow.WorkflowFullName + "/verify.py"

func Workflow(wf *wfv1.Workflow) error {
verify, ok := wf.GetAnnotations()[workflow.WorkflowFullName+"/verify.py"]
verify, ok := wf.GetAnnotations()[annotationName]
if !ok {
return nil
return fmt.Errorf("connot verify workflow: annotation %s not found", annotationName)
alexec marked this conversation as resolved.
Show resolved Hide resolved
}
nodes := wfv1.Nodes{}
for _, n := range wf.Status.Nodes {
Expand Down