Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 8 of 8 for expectMetrics (0.37 sec)

  1. pkg/registry/core/service/portallocator/allocator_test.go

    		allocated: 2,
    		errors:    0,
    	}
    	expectMetrics(t, em)
    
    	// try to allocate the same ports
    	for s := range found {
    		if !a.Has(s) {
    			t.Fatalf("missing: %d", s)
    		}
    		if err := a.Allocate(s); err != ErrAllocated {
    			t.Fatal(err)
    		}
    	}
    	em = testMetrics{
    		free:      2768 - 2,
    		used:      2,
    		allocated: 2,
    		errors:    2,
    	}
    	expectMetrics(t, em)
    
    	// release the ports allocated
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 08 07:15:02 UTC 2024
    - 14K bytes
    - Viewed (0)
  2. pkg/controller/volume/ephemeral/controller_test.go

    			if err != nil {
    				t.Fatalf("unexpected error while listing PVCs: %v", err)
    			}
    			assert.Equal(t, sortPVCs(tc.expectedPVCs), sortPVCs(pvcs.Items))
    			expectMetrics(t, tc.expectedMetrics)
    		})
    	}
    }
    
    func makePVC(name, namespace string, owner *metav1.OwnerReference) *v1.PersistentVolumeClaim {
    	pvc := &v1.PersistentVolumeClaim{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. pkg/registry/core/service/ipallocator/controller/repair_test.go

    	}
    	em := testMetrics{
    		leak:       1,
    		repair:     0,
    		outOfRange: 0,
    		duplicate:  0,
    		unknown:    0,
    		invalid:    0,
    		full:       0,
    	}
    	expectMetrics(t, em)
    }
    
    func TestRepairWithExisting(t *testing.T) {
    	clearMetrics()
    
    	_, cidr, _ := netutils.ParseCIDRSloppy("192.168.1.0/24")
    	previous, err := ipallocator.NewInMemory(cidr)
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 21.1K bytes
    - Viewed (0)
  4. pkg/registry/core/service/portallocator/controller/repair_test.go

    		t.Errorf("expected portallocator to not have leaked port")
    	}
    	em := testMetrics{
    		leak:       1,
    		repair:     0,
    		outOfRange: 0,
    		duplicate:  0,
    		unknown:    0,
    	}
    	expectMetrics(t, em)
    }
    
    func TestRepairWithExisting(t *testing.T) {
    	clearMetrics()
    	pr, _ := net.ParsePortRange("100-200")
    	previous, err := portallocator.NewInMemory(*pr)
    	if err != nil {
    		t.Fatal(err)
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Sep 30 15:46:06 UTC 2023
    - 10.6K bytes
    - Viewed (0)
  5. pkg/controller/resourceclaim/controller_test.go

    			if err != nil {
    				t.Fatalf("unexpected error while listing claims: %v", err)
    			}
    			assert.Equal(t, normalizeScheduling(tc.expectedPodSchedulingContexts), normalizeScheduling(scheduling.Items))
    
    			expectMetrics(t, tc.expectedMetrics)
    		})
    	}
    }
    
    func makeClaim(name, namespace, classname string, owner *metav1.OwnerReference) *resourcev1alpha2.ResourceClaim {
    	claim := &resourcev1alpha2.ResourceClaim{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon May 06 08:56:16 UTC 2024
    - 28.2K bytes
    - Viewed (0)
  6. pkg/kubelet/kubelet_pods_test.go

    		wantWorkerAfterRetry    func(t *testing.T, w *podWorkers, records map[types.UID][]syncPodRecord)
    		wantErr                 bool
    		expectMetrics           map[string]string
    		expectMetricsAfterRetry map[string]string
    	}{
    		{
    			name:    "missing pod is requested for termination with short grace period",
    			wantErr: false,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jun 07 00:05:23 UTC 2024
    - 198.8K bytes
    - Viewed (0)
  7. pkg/controller/endpointslicemirroring/reconciler_test.go

    				t.Fatalf("Expected %d additional client actions, got %d: %#v", tc.expectedClientActions, numExtraActions, client.Actions()[numInitialActions:])
    			}
    
    			if tc.expectedMetrics != nil {
    				expectMetrics(t, *tc.expectedMetrics)
    			}
    
    			endpointSlices := fetchEndpointSlices(t, client, namespace)
    			expectEndpointSlices(t, tc.expectedNumSlices, int(maxEndpointsPerSubset), endpoints, endpointSlices)
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 26 06:51:56 UTC 2024
    - 42.7K bytes
    - Viewed (0)
  8. staging/src/k8s.io/apiserver/pkg/endpoints/filters/authentication_test.go

    			}
    		})
    	}
    }
    
    func TestAuthenticateMetrics(t *testing.T) {
    	testcases := []struct {
    		name         string
    		header       bool
    		apiAuds      []string
    		respAuds     []string
    		expectMetric bool
    		expectOk     bool
    		expectError  bool
    	}{
    		{
    			name:        "no api audience and no audience in response",
    			header:      true,
    			apiAuds:     nil,
    			respAuds:    nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 20.5K bytes
    - Viewed (0)
Back to top