diff --git a/pkg/remoteresolution/resolver/git/resolver_test.go b/pkg/remoteresolution/resolver/git/resolver_test.go index c1b043983c7..84c5eb7c3e4 100644 --- a/pkg/remoteresolution/resolver/git/resolver_test.go +++ b/pkg/remoteresolution/resolver/git/resolver_test.go @@ -645,9 +645,9 @@ func TestResolve(t *testing.T) { gitresolution.APISecretKeyKey: "token", gitresolution.APISecretNamespaceKey: system.Namespace(), }, - apiToken: "some-token", - expectedStatus: resolution.CreateResolutionRequestFailureStatus(), - expectedErr: createError("missing or empty scm-type value in configmap"), + apiToken: "some-token", + expectedCommitSHA: commitSHAsInSCMRepo[0], + expectedStatus: resolution.CreateResolutionRequestStatusWithData(mainPipelineYAML), }} for _, tc := range testCases { diff --git a/pkg/resolution/resolver/git/resolver.go b/pkg/resolution/resolver/git/resolver.go index b20104acc7e..73815e96bbb 100644 --- a/pkg/resolution/resolver/git/resolver.go +++ b/pkg/resolution/resolver/git/resolver.go @@ -530,18 +530,12 @@ func getSCMTypeAndServerURL(ctx context.Context, params map[string]string) (stri } if scmType == "" { scmType = conf.SCMType - if scmType == "" { - return "", "", fmt.Errorf("missing or empty %s value in configmap", SCMTypeKey) - } } if key, ok := params[ServerURLParam]; ok { serverURL = key } if serverURL == "" { serverURL = conf.ServerURL - if serverURL == "" { - return "", "", fmt.Errorf("missing or empty %s value in configmap", ServerURLKey) - } } return scmType, serverURL, nil } diff --git a/pkg/resolution/resolver/git/resolver_test.go b/pkg/resolution/resolver/git/resolver_test.go index 7cb7a4dc865..9001ab27cbe 100644 --- a/pkg/resolution/resolver/git/resolver_test.go +++ b/pkg/resolution/resolver/git/resolver_test.go @@ -642,9 +642,9 @@ func TestResolve(t *testing.T) { APISecretKeyKey: "token", APISecretNamespaceKey: system.Namespace(), }, - apiToken: "some-token", - expectedStatus: resolution.CreateResolutionRequestFailureStatus(), - expectedErr: createError("missing or empty scm-type value in configmap"), + apiToken: "some-token", + expectedCommitSHA: commitSHAsInSCMRepo[0], + expectedStatus: resolution.CreateResolutionRequestStatusWithData(mainPipelineYAML), }} for _, tc := range testCases {