add devops credential controller

Signed-off-by: runzexia <runzexia@yunify.com>
This commit is contained in:
runzexia
2020-03-26 14:53:33 +08:00
parent e8b9d9cdf3
commit af3b87ddca
13 changed files with 961 additions and 641 deletions

View File

@@ -354,12 +354,15 @@ func TestDeletePipeline(t *testing.T) {
ns := newNamespace(nsName, projectName)
pipeline := newDeletingPipeline(nsName, pipelineName)
expectPipeline := pipeline.DeepCopy()
expectPipeline.Finalizers = []string{}
f.pipelineLister = append(f.pipelineLister, pipeline)
f.namespaceLister = append(f.namespaceLister, ns)
f.objects = append(f.objects, pipeline)
f.initDevOpsProject = nsName
f.initPipeline = []*devops.Pipeline{pipeline}
f.expectPipeline = []*devops.Pipeline{}
f.expectUpdatePipelineAction(expectPipeline)
f.run(getKey(pipeline, t))
}
@@ -372,12 +375,15 @@ func TestDeleteNotExistPipeline(t *testing.T) {
ns := newNamespace(nsName, projectName)
pipeline := newDeletingPipeline(nsName, pipelineName)
expectPipeline := pipeline.DeepCopy()
expectPipeline.Finalizers = []string{}
f.pipelineLister = append(f.pipelineLister, pipeline)
f.namespaceLister = append(f.namespaceLister, ns)
f.objects = append(f.objects, pipeline)
f.initDevOpsProject = nsName
f.initPipeline = []*devops.Pipeline{}
f.expectPipeline = []*devops.Pipeline{}
f.expectUpdatePipelineAction(expectPipeline)
f.run(getKey(pipeline, t))
}