@@ -384,7 +384,7 @@ func TestGenerateCelExpressionForPipeline(t *testing.T) {
384384 }(),
385385 targetBranch : "my-branch" ,
386386 wantOnPull : `event == "pull_request" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request.yaml".pathChanged() )` ,
387- wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request .yaml".pathChanged() )` ,
387+ wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-push .yaml".pathChanged() )` ,
388388 },
389389 {
390390 name : "should generate cel expression for component with context directory and its dockerfile in context directory" ,
@@ -398,7 +398,7 @@ func TestGenerateCelExpressionForPipeline(t *testing.T) {
398398 return true , nil
399399 },
400400 wantOnPull : `event == "pull_request" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request.yaml".pathChanged() )` ,
401- wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request .yaml".pathChanged() )` ,
401+ wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-push .yaml".pathChanged() )` ,
402402 },
403403 {
404404 name : "should generate cel expression for component with context directory and its dockerfile outside context directory" ,
@@ -412,7 +412,7 @@ func TestGenerateCelExpressionForPipeline(t *testing.T) {
412412 return false , nil
413413 },
414414 wantOnPull : `event == "pull_request" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request.yaml".pathChanged() || "docker-root-dir/Dockerfile".pathChanged() )` ,
415- wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request .yaml".pathChanged() || "docker-root-dir/Dockerfile".pathChanged() )` ,
415+ wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-push .yaml".pathChanged() || "docker-root-dir/Dockerfile".pathChanged() )` ,
416416 },
417417 {
418418 name : "should generate cel expression for component with context directory and its dockerfile outside git repository" ,
@@ -423,7 +423,7 @@ func TestGenerateCelExpressionForPipeline(t *testing.T) {
423423 }(),
424424 targetBranch : "my-branch" ,
425425 wantOnPull : `event == "pull_request" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request.yaml".pathChanged() )` ,
426- wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-pull-request .yaml".pathChanged() )` ,
426+ wantOnPush : `event == "push" && target_branch == "my-branch" && ( "component-dir/***".pathChanged() || ".tekton/component-name-push .yaml".pathChanged() )` ,
427427 },
428428 {
429429 name : "should fail to generate cel expression for component if isFileExist fails" ,
0 commit comments