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:
Clayton Coleman
2015-03-21 12:24:16 -04:00
parent df672504c2
commit d46087db50
30 changed files with 216 additions and 187 deletions

View File

@@ -28,6 +28,7 @@ import (
"strings"
"testing"
"github.com/GoogleCloudPlatform/kubernetes/pkg/api/rest"
"golang.org/x/net/html"
"golang.org/x/net/websocket"
)
@@ -280,10 +281,10 @@ func TestProxy(t *testing.T) {
expectedResourceNamespace: item.reqNamespace,
}
namespaceHandler := handleNamespaced(map[string]RESTStorage{"foo": simpleStorage})
namespaceHandler := handleNamespaced(map[string]rest.Storage{"foo": simpleStorage})
namespaceServer := httptest.NewServer(namespaceHandler)
defer namespaceServer.Close()
legacyNamespaceHandler := handle(map[string]RESTStorage{"foo": simpleStorage})
legacyNamespaceHandler := handle(map[string]rest.Storage{"foo": simpleStorage})
legacyNamespaceServer := httptest.NewServer(legacyNamespaceHandler)
defer legacyNamespaceServer.Close()
@@ -340,7 +341,7 @@ func TestProxyUpgrade(t *testing.T) {
expectedResourceNamespace: "myns",
}
namespaceHandler := handleNamespaced(map[string]RESTStorage{"foo": simpleStorage})
namespaceHandler := handleNamespaced(map[string]rest.Storage{"foo": simpleStorage})
server := httptest.NewServer(namespaceHandler)
defer server.Close()