File tree Expand file tree Collapse file tree 1 file changed +15
-3
lines changed
Expand file tree Collapse file tree 1 file changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -131,15 +131,27 @@ func (f *Framework) ManagePipelineRuns(pipelineRuns ...*pipev1.PipelineRun) *Fra
131131}
132132
133133func (f * Framework ) ManagePipelines (pipelines ... * pipev1.Pipeline ) * Framework {
134- f .managedResources .pipelines = append (f .managedResources .pipelines , pipelines ... )
134+ for _ , pipeline := range pipelines {
135+ if pipeline == nil || pipeline .Name == "" {
136+ continue
137+ }
138+ if pipeline .Namespace == "" {
139+ pipeline .Namespace = f .DeployNamespace
140+ }
141+ f .managedResources .pipelines = append (f .managedResources .pipelines , pipeline )
142+ }
135143 return f
136144}
137145
138146func (f * Framework ) ManageDataVolumes (dataVolumes ... * cdiv1beta1.DataVolume ) * Framework {
139147 for _ , dataVolume := range dataVolumes {
140- if dataVolume != nil && dataVolume .Name != "" && dataVolume .Namespace != "" {
141- f .managedResources .dataVolumes = append (f .managedResources .dataVolumes , dataVolume )
148+ if dataVolume == nil || dataVolume .Name == "" {
149+ continue
150+ }
151+ if dataVolume .Namespace == "" {
152+ dataVolume .Namespace = f .DeployNamespace
142153 }
154+ f .managedResources .dataVolumes = append (f .managedResources .dataVolumes , dataVolume )
143155 }
144156 return f
145157}
You can’t perform that action at this time.
0 commit comments