Remove unused HACK for testing new configuration (#103172)

pull/103180/head
Roberto Jiménez Sánchez 4 months ago committed by GitHub
parent ca35a89916
commit f91f739ee2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 16
      pkg/registry/apis/provisioning/test.go

@ -7,7 +7,6 @@ import (
"reflect"
"time"
apierrors "k8s.io/apimachinery/pkg/api/errors"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apiserver/pkg/registry/rest"
@ -67,21 +66,6 @@ func (s *testConnector) Connect(ctx context.Context, name string, opts runtime.O
responder.Error(err)
return
}
// TODO: Explore how to better support synchronous validation for the UI (and likely remove this hack)
if name != "new" {
repo, err = s.getter.AsRepository(ctx, &cfg)
if err != nil {
responder.Error(err)
return
}
// Make sure we are OK with the changes
if cfg.Spec.Type != repo.Config().Spec.Type {
responder.Error(apierrors.NewBadRequest("test config must be the same type"))
return
}
}
repo = tmp
}
}

Loading…
Cancel
Save