Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 2,759 for _Equal (0.13 sec)

  1. pkg/kubelet/winstats/perfcounter_nodestats_test.go

    		nodeInfo: nodeInfo{
    			memoryPhysicalCapacityBytes: 100,
    		},
    	}
    
    	machineInfo, err := p.getMachineInfo()
    	assert.NoError(t, err)
    	assert.Equal(t, uint64(100), machineInfo.MemoryCapacity)
    	hostname, _ := os.Hostname()
    	assert.Equal(t, hostname, machineInfo.MachineID)
    
    	// Check if it's an UUID.
    	_, err = uuid.Parse(machineInfo.SystemUUID)
    	assert.NoError(t, err)
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Jan 26 18:37:21 UTC 2024
    - 5.7K bytes
    - Viewed (0)
  2. pilot/pkg/model/addressmap_test.go

    			g := NewWithT(t)
    			g.Expect(c.newMap().Len()).To(Equal(c.expected))
    		})
    	}
    }
    
    func TestAddressMapGetAddressesFor(t *testing.T) {
    	g := NewWithT(t)
    
    	m := model.AddressMap{
    		Addresses: map[cluster.ID][]string{
    			c1ID: c1Addresses,
    			c2ID: c2Addresses,
    		},
    	}
    
    	g.Expect(m.GetAddressesFor(c1ID)).To(Equal(c1Addresses))
    	g.Expect(m.GetAddressesFor(c2ID)).To(Equal(c2Addresses))
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 2.9K bytes
    - Viewed (0)
  3. internal/etag/etag_test.go

    }
    
    func TestEqual(t *testing.T) {
    	for i, test := range equalTests {
    		A, err := Parse(test.A)
    		if err != nil {
    			t.Fatalf("Test %d: %v", i, err)
    		}
    		B, err := Parse(test.B)
    		if err != nil {
    			t.Fatalf("Test %d: %v", i, err)
    		}
    		if equal := Equal(A, B); equal != test.Equal {
    			t.Fatalf("Test %d: got %v - want %v", i, equal, test.Equal)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Sep 18 17:00:54 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  4. src/slices/slices_test.go

    	for _, test := range equalIntTests {
    		if got := Equal(test.s1, test.s2); got != test.want {
    			t.Errorf("Equal(%v, %v) = %t, want %t", test.s1, test.s2, got, test.want)
    		}
    	}
    	for _, test := range equalFloatTests {
    		if got := Equal(test.s1, test.s2); got != test.wantEqual {
    			t.Errorf("Equal(%v, %v) = %t, want %t", test.s1, test.s2, got, test.wantEqual)
    		}
    	}
    }
    
    // equal is simply ==.
    func equal[T comparable](v1, v2 T) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 26 13:32:06 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  5. pkg/kube/kclient/crdwatcher_test.go

    	ctl := c.CrdWatcher()
    	// Created before informer runs
    	assert.Equal(t, ctl.KnownOrCallback(gvr.VirtualService, func(s <-chan struct{}) {
    		assert.Equal(t, s, stop)
    		vsCalls.Inc()
    	}), false)
    
    	c.RunAndWait(stop)
    	assert.EventuallyEqual(t, vsCalls.Load, 1)
    
    	// created once running
    	assert.Equal(t, ctl.KnownOrCallback(gvr.GatewayClass, func(s <-chan struct{}) {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Apr 25 14:44:17 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  6. pkg/config/analysis/analyzers/util/exportto_test.go

    	g := NewWithT(t)
    
    	// Empty array
    	g.Expect(IsExportToAllNamespaces(nil)).To(Equal(true))
    
    	// Array with "*"
    	g.Expect(IsExportToAllNamespaces([]string{"*"})).To(Equal(true))
    
    	// Array with "."
    	g.Expect(IsExportToAllNamespaces([]string{"."})).To(Equal(false))
    
    	// Array with "." & "*"
    	g.Expect(IsExportToAllNamespaces([]string{".", "*"})).To(Equal(true))
    
    	// Array with "bogus"
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Oct 31 14:48:28 UTC 2023
    - 1.1K bytes
    - Viewed (0)
  7. pkg/kubelet/kuberuntime/kuberuntime_image_test.go

    	imageRef, err := fakeManager.PullImage(ctx, kubecontainer.ImageSpec{Image: "busybox"}, nil, nil)
    	assert.NoError(t, err)
    	assert.Equal(t, "busybox", imageRef)
    
    	images, err := fakeManager.ListImages(ctx)
    	assert.NoError(t, err)
    	assert.Equal(t, 1, len(images))
    	assert.Equal(t, images[0].RepoTags, []string{"busybox"})
    }
    
    func TestPullImageWithError(t *testing.T) {
    	ctx := context.Background()
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 12.8K bytes
    - Viewed (0)
  8. pkg/util/env/env_test.go

    	t.Setenv(key, strconv.Itoa(expected))
    	returnVal, _ := GetEnvAsIntOrFallback(key, 1)
    	assert.Equal(expected, returnVal)
    
    	key = "FLOCKER_UNSET_VAR"
    	returnVal, _ = GetEnvAsIntOrFallback(key, expected)
    	assert.Equal(expected, returnVal)
    
    	key = "FLOCKER_SET_VAR"
    	t.Setenv(key, "not-an-int")
    	returnVal, err := GetEnvAsIntOrFallback(key, 1)
    	assert.Equal(expected, returnVal)
    	if err == nil {
    		t.Error("expected error")
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 18 01:39:46 UTC 2023
    - 2.1K bytes
    - Viewed (0)
  9. pkg/scheduler/framework/interface_test.go

    		name string
    		x, y *Status
    		want bool
    	}{
    		{
    			name: "two nil should be equal",
    			x:    nil,
    			y:    nil,
    			want: true,
    		},
    		{
    			name: "nil should be equal to success status",
    			x:    nil,
    			y:    NewStatus(Success),
    			want: true,
    		},
    		{
    			name: "nil should not be equal with status except success",
    			x:    nil,
    			y:    NewStatus(Error, "internal error"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Oct 22 04:41:59 UTC 2023
    - 7.3K bytes
    - Viewed (0)
  10. platforms/ide/problems-api/src/test/groovy/org/gradle/api/problems/internal/DefaultProblemDefinitionReport.groovy

    import spock.lang.Specification
    
    class DefaultProblemDefinitionReport extends Specification {
        def "equal objects are equal"() {
            when:
            def pd1 = createProblemDefinition()
            def pd2 = createProblemDefinition()
    
            then:
            pd1 == pd2
            pd1 == pd1
        }
    
        def "Changed label causes equal to be false"() {
    
            when:
            def pd1 = createProblemDefinition()
    Registered: Wed Jun 12 18:38:38 UTC 2024
    - Last Modified: Wed Mar 06 13:35:05 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top