Skip to content

Commit 5a402a7

Browse files
authored
fix: broken tests in githubcredentials_controller_test.go (#199)
main broke as #189 did not include new githubcredentials_controller_test.go which still referenced Endpoint Resources with old CaCertBundle instead of CaCertBundleSecretRef field
1 parent dd90cf0 commit 5a402a7

File tree

1 file changed

+25
-25
lines changed

1 file changed

+25
-25
lines changed

internal/controller/githubcredentials_controller_test.go

+25-25
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ func TestGitHubCredentialReconciler_reconcileNormal(t *testing.T) {
8282
},
8383
},
8484
Spec: garmoperatorv1beta1.GitHubEndpointSpec{
85-
Description: "existing-github-endpoint",
86-
APIBaseURL: "https://api.github.com",
87-
UploadBaseURL: "https://uploads.github.com",
88-
BaseURL: "https://github.com",
89-
CACertBundle: []byte(""),
85+
Description: "existing-github-endpoint",
86+
APIBaseURL: "https://api.github.com",
87+
UploadBaseURL: "https://uploads.github.com",
88+
BaseURL: "https://github.com",
89+
CACertBundleSecretRef: garmoperatorv1beta1.SecretRef{},
9090
},
9191
},
9292
},
@@ -252,11 +252,11 @@ func TestGitHubCredentialReconciler_reconcileNormal(t *testing.T) {
252252
},
253253
},
254254
Spec: garmoperatorv1beta1.GitHubEndpointSpec{
255-
Description: "existing-github-endpoint",
256-
APIBaseURL: "https://api.github.com",
257-
UploadBaseURL: "https://uploads.github.com",
258-
BaseURL: "https://github.com",
259-
CACertBundle: []byte(""),
255+
Description: "existing-github-endpoint",
256+
APIBaseURL: "https://api.github.com",
257+
UploadBaseURL: "https://uploads.github.com",
258+
BaseURL: "https://github.com",
259+
CACertBundleSecretRef: garmoperatorv1beta1.SecretRef{},
260260
},
261261
},
262262
},
@@ -475,11 +475,11 @@ func TestGitHubCredentialReconciler_reconcileNormal(t *testing.T) {
475475
},
476476
},
477477
Spec: garmoperatorv1beta1.GitHubEndpointSpec{
478-
Description: "existing-github-endpoint",
479-
APIBaseURL: "https://api.github.com",
480-
UploadBaseURL: "https://uploads.github.com",
481-
BaseURL: "https://github.com",
482-
CACertBundle: []byte(""),
478+
Description: "existing-github-endpoint",
479+
APIBaseURL: "https://api.github.com",
480+
UploadBaseURL: "https://uploads.github.com",
481+
BaseURL: "https://github.com",
482+
CACertBundleSecretRef: garmoperatorv1beta1.SecretRef{},
483483
},
484484
},
485485
},
@@ -702,11 +702,11 @@ func TestGitHubCredentialReconciler_reconcileNormal(t *testing.T) {
702702
},
703703
},
704704
Spec: garmoperatorv1beta1.GitHubEndpointSpec{
705-
Description: "existing-github-endpoint",
706-
APIBaseURL: "https://api.github.com",
707-
UploadBaseURL: "https://uploads.github.com",
708-
BaseURL: "https://github.com",
709-
CACertBundle: []byte(""),
705+
Description: "existing-github-endpoint",
706+
APIBaseURL: "https://api.github.com",
707+
UploadBaseURL: "https://uploads.github.com",
708+
BaseURL: "https://github.com",
709+
CACertBundleSecretRef: garmoperatorv1beta1.SecretRef{},
710710
},
711711
},
712712
},
@@ -879,11 +879,11 @@ func TestGitHubCredentialReconciler_reconcileDelete(t *testing.T) {
879879
},
880880
},
881881
Spec: garmoperatorv1beta1.GitHubEndpointSpec{
882-
Description: "existing-github-endpoint",
883-
APIBaseURL: "https://api.github.com",
884-
UploadBaseURL: "https://uploads.github.com",
885-
BaseURL: "https://github.com",
886-
CACertBundle: []byte(""),
882+
Description: "existing-github-endpoint",
883+
APIBaseURL: "https://api.github.com",
884+
UploadBaseURL: "https://uploads.github.com",
885+
BaseURL: "https://github.com",
886+
CACertBundleSecretRef: garmoperatorv1beta1.SecretRef{},
887887
},
888888
},
889889
},

0 commit comments

Comments
 (0)