Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for TestAllocateReserved (0.27 sec)

  1. pkg/registry/core/service/ipallocator/storage/storage_test.go

    	}
    	if ok {
    		t.Fatal("Expected allocation to fail")
    	}
    	if err := storage.Allocate(netutils.ParseIPSloppy("192.168.1.2")); err != ipallocator.ErrAllocated {
    		t.Fatal(err)
    	}
    }
    
    func TestAllocateReserved(t *testing.T) {
    	_, storage, _, si, destroyFunc := newStorage(t)
    	defer destroyFunc()
    	if err := si.Create(context.TODO(), key(), validNewRangeAllocation(), nil, 0); err != nil {
    		t.Fatalf("unexpected error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Aug 24 09:23:05 UTC 2023
    - 5.9K bytes
    - Viewed (0)
  2. pkg/registry/core/service/portallocator/storage/storage_test.go

    		t.Fatal(err)
    	}
    
    	// Try to allocate the port again should succeed because we've released it
    	if err := storage.Allocate(30100); err != nil {
    		t.Fatal(err)
    	}
    
    }
    
    func TestAllocateReserved(t *testing.T) {
    	_, storage, _, si, destroyFunc := newStorage(t)
    	defer destroyFunc()
    	if err := si.Create(context.TODO(), key(), validNewRangeAllocation(), nil, 0); err != nil {
    		t.Fatalf("unexpected error: %v", err)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 8.1K bytes
    - Viewed (0)
  3. pkg/registry/core/service/portallocator/allocator_test.go

    		t.Fatal(err)
    	}
    	if f := r.Free(); f != 0 {
    		t.Errorf("unexpected free %d", f)
    	}
    	if f := r.Used(); f != 201 {
    		t.Errorf("unexpected used %d", f)
    	}
    }
    
    func TestAllocateReserved(t *testing.T) {
    	pr, err := net.ParsePortRange("30000-30128")
    	if err != nil {
    		t.Fatal(err)
    	}
    
    	r, err := NewInMemory(*pr)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  4. pkg/registry/core/service/ipallocator/bitmap_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    	if f := r.Free(); f != 0 {
    		t.Errorf("free: %d", f)
    	}
    	if _, err := r.AllocateNext(); err != ErrFull {
    		t.Error(err)
    	}
    }
    
    func TestAllocateReserved(t *testing.T) {
    	_, cidr, err := netutils.ParseCIDRSloppy("192.168.1.0/25")
    	if err != nil {
    		t.Fatal(err)
    	}
    	r, err := NewInMemory(cidr)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 25 20:32:40 UTC 2023
    - 21.1K bytes
    - Viewed (0)
Back to top