Fix ks-controller panic due to missing nil checking in mutli-branch pipeline
Signed-off-by: rick <rick@jenkins-zh.cn>
This commit is contained in:
14
pkg/simple/client/devops/jenkins/internal/common_test.go
Normal file
14
pkg/simple/client/devops/jenkins/internal/common_test.go
Normal file
@@ -0,0 +1,14 @@
|
||||
package internal
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestCommonSituation(t *testing.T) {
|
||||
// make sure these functions do not panic
|
||||
// I add these test cases because it's possible that users just do give the git source
|
||||
AppendGitlabSourceToEtree(nil, nil)
|
||||
AppendGithubSourceToEtree(nil, nil)
|
||||
AppendBitbucketServerSourceToEtree(nil, nil)
|
||||
AppendGitSourceToEtree(nil, nil)
|
||||
AppendSingleSvnSourceToEtree(nil, nil)
|
||||
AppendSvnSourceToEtree(nil, nil)
|
||||
}
|
||||
Reference in New Issue
Block a user