Search Options

Results per page
Sort
Preferred Languages
Advance

Results 41 - 50 of 74 for newStorage (0.22 sec)

  1. pkg/registry/apps/rest/storage_apps.go

    	storage := map[string]rest.Storage{}
    
    	// deployments
    	if resource := "deployments"; apiResourceConfigSource.ResourceEnabled(appsapiv1.SchemeGroupVersion.WithResource(resource)) {
    		deploymentStorage, err := deploymentstore.NewStorage(restOptionsGetter)
    		if err != nil {
    			return storage, err
    		}
    		storage[resource] = deploymentStorage.Deployment
    		storage[resource+"/status"] = deploymentStorage.Status
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 23 18:36:33 UTC 2022
    - 4.5K bytes
    - Viewed (0)
  2. pkg/registry/apps/replicaset/storage/storage_test.go

    )
    
    const defaultReplicas = 100
    
    func newStorage(t *testing.T) (*ReplicaSetStorage, *etcd3testing.EtcdTestServer) {
    	etcdStorage, server := registrytest.NewEtcdStorage(t, "extensions")
    	restOptions := generic.RESTOptions{StorageConfig: etcdStorage, Decorator: generic.UndecoratedStorage, DeleteCollectionWorkers: 1, ResourcePrefix: "replicasets"}
    	replicaSetStorage, err := NewStorage(restOptions)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 12 15:46:12 UTC 2023
    - 17.7K bytes
    - Viewed (0)
  3. pkg/registry/core/service/allocator/storage/storage_test.go

    }
    
    func TestEmpty(t *testing.T) {
    	storage, server, _, _ := newStorage(t)
    	defer server.Terminate(t)
    	if _, err := storage.Allocate(1); !strings.Contains(err.Error(), "cannot allocate resources of type serviceipallocations at this time") {
    		t.Fatal(err)
    	}
    }
    
    func TestStore(t *testing.T) {
    	storage, server, backing, config := newStorage(t)
    	defer server.Terminate(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Sep 01 20:54:26 UTC 2021
    - 4.8K bytes
    - Viewed (0)
  4. pkg/registry/core/service/ipallocator/storage/storage_test.go

    }
    
    func TestEmpty(t *testing.T) {
    	_, storage, _, _, destroyFunc := newStorage(t)
    	defer destroyFunc()
    	if err := storage.Allocate(netutils.ParseIPSloppy("192.168.1.2")); !strings.Contains(err.Error(), "cannot allocate resources of type serviceipallocations at this time") {
    		t.Fatal(err)
    	}
    }
    
    func TestErrors(t *testing.T) {
    	_, storage, _, _, destroyFunc := newStorage(t)
    	defer destroyFunc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  5. pkg/registry/core/namespace/storage/storage_test.go

    	}
    }
    
    func TestDelete(t *testing.T) {
    	storage, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.store.DestroyFunc()
    	test := genericregistrytest.New(t, storage.store).ClusterScope().ReturnDeletedObject()
    	test.TestDelete(validNewNamespace())
    }
    
    func TestGet(t *testing.T) {
    	storage, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.store.DestroyFunc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 17 05:13:34 UTC 2022
    - 19.8K bytes
    - Viewed (0)
  6. pkg/registry/core/pod/storage/storage_test.go

    		}
    
    	}
    }
    
    func TestGet(t *testing.T) {
    	storage, _, _, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.Store.DestroyFunc()
    	test := genericregistrytest.New(t, storage.Store)
    	test.TestGet(validNewPod())
    }
    
    func TestList(t *testing.T) {
    	storage, _, _, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.Store.DestroyFunc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 07:18:44 UTC 2024
    - 38.8K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiextensions-apiserver/pkg/registry/customresource/etcd_test.go

    func TestCreate(t *testing.T) {
    	storage, server := newStorage(t)
    	defer server.Terminate(t)
    	defer storage.CustomResource.Store.DestroyFunc()
    	test := registrytest.New(t, storage.CustomResource.Store)
    	cr := validNewCustomResource()
    	cr.SetNamespace("")
    	test.TestCreate(
    		cr,
    	)
    }
    
    func TestGet(t *testing.T) {
    	storage, server := newStorage(t)
    	defer server.Terminate(t)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Feb 28 19:06:46 UTC 2024
    - 25.2K bytes
    - Viewed (0)
  8. pkg/registry/storage/csinode/storage/storage.go

    type CSINodeStorage struct {
    	CSINode *REST
    }
    
    // REST object that will work for CSINodes
    type REST struct {
    	*genericregistry.Store
    }
    
    // NewStorage returns a RESTStorage object that will work against CSINodes
    func NewStorage(optsGetter generic.RESTOptionsGetter) (*CSINodeStorage, error) {
    	store := &genericregistry.Store{
    		NewFunc:                   func() runtime.Object { return &storageapi.CSINode{} },
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:13 UTC 2022
    - 2.1K bytes
    - Viewed (0)
  9. pkg/registry/core/service/portallocator/storage/storage_test.go

    	_, storage, _, _, destroyFunc := newStorage(t)
    	defer destroyFunc()
    	if err := storage.Allocate(31000); !strings.Contains(err.Error(), "cannot allocate resources of type servicenodeportallocations at this time") {
    		t.Fatal(err)
    	}
    }
    
    // TestAllocate fails to allocate ports out of the valid port range
    func TestAllocate(t *testing.T) {
    	_, storage, _, si, destroyFunc := newStorage(t)
    	defer destroyFunc()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  10. pkg/registry/storage/csistoragecapacity/storage/storage.go

    	CSIStorageCapacity *REST
    }
    
    // REST object that will work for CSIStorageCapacity
    type REST struct {
    	*genericregistry.Store
    }
    
    // NewStorage returns a RESTStorage object that will work against CSIStorageCapacity
    func NewStorage(optsGetter generic.RESTOptionsGetter) (*CSIStorageCapacityStorage, error) {
    	store := &genericregistry.Store{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 18 09:21:13 UTC 2022
    - 2.1K bytes
    - Viewed (0)
Back to top