mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-10 13:42:02 +00:00
Rename NewREST -> NewStorage to align on terminology
This commit is contained in:
@@ -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,
|
||||
|
@@ -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(®istrytest.ControllerRegistry{}, nil)
|
||||
storage := NewStorage(®istrytest.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 := ®istrytest.ControllerRegistry{}
|
||||
test := resttest.New(t, NewREST(registry, nil), registry.SetError)
|
||||
test := resttest.New(t, NewStorage(registry, nil), registry.SetError)
|
||||
test.TestCreate(
|
||||
// valid
|
||||
&api.ReplicationController{
|
||||
|
Reference in New Issue
Block a user