Skip to content

Commit 2133317

Browse files
committed
Add nits for better testing and fix schema parsing
1 parent a922ba3 commit 2133317

6 files changed

Lines changed: 588 additions & 6 deletions

File tree

backend/http/handler.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,12 @@ func (h *handler) AddRoutes(mux *mux.Router) {
116116
mux.HandleFunc("/authorize", h.handleAuthorize).Methods("GET")
117117

118118
mux.HandleFunc("/callback", h.handleCallback).Methods("GET")
119+
mux.HandleFunc("/healthz", h.handleHealthz).Methods("GET")
120+
}
121+
122+
func (h *handler) handleHealthz(w http.ResponseWriter, r *http.Request) {
123+
prepareNoCache(w)
124+
w.WriteHeader(http.StatusOK)
119125
}
120126

121127
func (h *handler) handleServiceExport(w http.ResponseWriter, r *http.Request) {

cli/pkg/kubectl/bind/plugin/bind.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ func (b *BindOptions) Run(ctx context.Context, urlCh chan<- string) error {
159159
}
160160

161161
if provider.APIVersion != kubebindv1alpha2.GroupVersion {
162-
return fmt.Errorf("unsupported binding provider version: %q", provider.APIVersion)
162+
return fmt.Errorf("unsupported binding provider version: %q != %q", provider.APIVersion, kubebindv1alpha2.GroupVersion)
163163
}
164164

165165
ns, err := kubeClient.CoreV1().Namespaces().Get(ctx, "kube-bind", metav1.GetOptions{})

0 commit comments

Comments
 (0)