| 553 | } |
| 554 | |
| 555 | func mustCreateFakePipelineObject() runtime.Object { |
| 556 | gitCloneTask := pipeline.PipelineTask{ |
| 557 | TaskRef: &pipeline.TaskRef{ |
| 558 | Name: "git-clone", |
| 559 | }, |
| 560 | } |
| 561 | buildahTask := pipeline.PipelineTask{ |
| 562 | TaskRef: &pipeline.TaskRef{ |
| 563 | ResolverRef: pipeline.ResolverRef{ |
| 564 | Resolver: "bundle", |
| 565 | Params: []pipeline.Param{ |
| 566 | { |
| 567 | Name: "name", |
| 568 | Value: pipeline.ParamValue{ |
| 569 | StringVal: "buildah", |
| 570 | }, |
| 571 | }, |
| 572 | }, |
| 573 | }, |
| 574 | }, |
| 575 | } |
| 576 | summaryTask := pipeline.PipelineTask{ |
| 577 | TaskRef: &pipeline.TaskRef{ |
| 578 | Name: "summary", |
| 579 | }, |
| 580 | } |
| 581 | p := pipeline.Pipeline{} |
| 582 | p.SetDefaults(context.Background()) |
| 583 | p.Spec.Tasks = []pipeline.PipelineTask{gitCloneTask, buildahTask} |
| 584 | p.Spec.Finally = []pipeline.PipelineTask{summaryTask} |
| 585 | |
| 586 | return &p |
| 587 | } |
| 588 | |
| 589 | func TestGroupUrls(t *testing.T) { |
| 590 | urls := []string{"registry.io/repository/image:tag", "git+https://git.io/organization/repository", "rhcr.io/repository/image:tag", "git+ssh://got.io/organization/repository"} |