Rename NewREST -> NewStorage to align on terminology

This commit is contained in:
Clayton Coleman
2015-03-21 12:32:31 -04:00
parent 5a3f0adbcc
commit 9bb797fe93
21 changed files with 100 additions and 100 deletions

View File

@@ -78,8 +78,8 @@ type REST struct {
strategy rcStrategy
}
// NewREST returns a new rest.Storage for the given registry and PodLister.
func NewREST(registry Registry, podLister PodLister) *REST {
// NewStorage returns a new rest.Storage for the given registry and PodLister.
func NewStorage(registry Registry, podLister PodLister) *REST {
return &REST{
registry: registry,
podLister: podLister,

View File

@@ -397,7 +397,7 @@ func (f *fakePodLister) ListPods(ctx api.Context, s labels.Selector) (*api.PodLi
// TODO: remove, covered by TestCreate
func TestCreateControllerWithGeneratedName(t *testing.T) {
storage := NewREST(&registrytest.ControllerRegistry{}, nil)
storage := NewStorage(&registrytest.ControllerRegistry{}, nil)
controller := &api.ReplicationController{
ObjectMeta: api.ObjectMeta{
Namespace: api.NamespaceDefault,
@@ -443,7 +443,7 @@ func TestCreateControllerWithConflictingNamespace(t *testing.T) {
func TestCreate(t *testing.T) {
registry := &registrytest.ControllerRegistry{}
test := resttest.New(t, NewREST(registry, nil), registry.SetError)
test := resttest.New(t, NewStorage(registry, nil), registry.SetError)
test.TestCreate(
// valid
&api.ReplicationController{