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:
rick
2020-12-03 13:48:25 +08:00
parent e16219be55
commit 0b4ed3f8c8
9 changed files with 648 additions and 506 deletions

View 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)
}