Remove unused HACK for testing new configuration (#103172)
This commit is contained in:
@@ -7,7 +7,6 @@ import (
|
|||||||
"reflect"
|
"reflect"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
apierrors "k8s.io/apimachinery/pkg/api/errors"
|
|
||||||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||||
"k8s.io/apimachinery/pkg/runtime"
|
"k8s.io/apimachinery/pkg/runtime"
|
||||||
"k8s.io/apiserver/pkg/registry/rest"
|
"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)
|
responder.Error(err)
|
||||||
return
|
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
|
repo = tmp
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user