mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-25 04:11:46 +00:00
Move REST* interfaces into pkg/api/rest
Dependency chain is now api -> api/rest -> apiserver. Makes the interfaces much cleaner to read, and cleans up some inconsistenties that crept in along the way.
This commit is contained in:
@@ -21,7 +21,7 @@ import (
|
||||
"testing"
|
||||
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/apiserver"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/fields"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/labels"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/registry/registrytest"
|
||||
@@ -73,8 +73,8 @@ func TestRESTCreate(t *testing.T) {
|
||||
}
|
||||
|
||||
for _, item := range table {
|
||||
_, rest := NewTestREST()
|
||||
c, err := rest.Create(item.ctx, item.secret)
|
||||
_, storage := NewTestREST()
|
||||
c, err := storage.Create(item.ctx, item.secret)
|
||||
if !item.valid {
|
||||
if err == nil {
|
||||
ctxNS := api.NamespaceValue(item.ctx)
|
||||
@@ -93,7 +93,7 @@ func TestRESTCreate(t *testing.T) {
|
||||
t.Errorf("diff: %s", util.ObjectDiff(e, a))
|
||||
}
|
||||
// Ensure we implement the interface
|
||||
_ = apiserver.ResourceWatcher(rest)
|
||||
_ = rest.Watcher(storage)
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user