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

Remove condition test builder #4119

Closed
Closed
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
15 changes: 13 additions & 2 deletions test/v1alpha1/pipelinerun_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import (
tb "github.com/tektoncd/pipeline/internal/builder/v1alpha1"
"github.com/tektoncd/pipeline/pkg/apis/pipeline"
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
resource "github.com/tektoncd/pipeline/pkg/apis/resource/v1alpha1"
"github.com/tektoncd/pipeline/pkg/artifacts"
corev1 "k8s.io/api/core/v1"
"k8s.io/apimachinery/pkg/api/errors"
Expand Down Expand Up @@ -556,8 +557,18 @@ func getPipelineWithFailingCondition(suffix int) *v1alpha1.Pipeline {
}

func getFailingCondition(namespace string) *v1alpha1.Condition {
return tb.Condition(cond1Name, tb.ConditionNamespace(namespace), tb.ConditionSpec(tb.ConditionSpecCheck("", "ubuntu",
tb.Command("/bin/bash"), tb.Args("exit 1"))))

return &resource.Condition{
ObjectMeta: metav1.ObjectMeta{Name: cond1Name, Namespace: namespace},
Spec: resource.ConditionSpec{
Container: &corev1.Container{
Name: "",
Image: "ubuntu",
Command: "/bin/bash",
Args: "exit 1",
},
},
}
}

func getConditionalPipelineRun(suffix int, namespace string) *v1alpha1.PipelineRun {
Expand Down