Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 622 for jest (0.16 sec)

  1. cmd/admin-handlers_test.go

    			err:            errDiskNotFound,
    			expectedAPIErr: toAPIErrorCode(GlobalContext, errDiskNotFound),
    		},
    	}
    
    	for i, test := range testCases {
    		actualErr := toAdminAPIErrCode(GlobalContext, test.err)
    		if actualErr != test.expectedAPIErr {
    			t.Errorf("Test %d: Expected %v but received %v",
    				i+1, test.expectedAPIErr, actualErr)
    		}
    	}
    }
    
    func TestExtractHealInitParams(t *testing.T) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 13.8K bytes
    - Viewed (0)
  2. cni/pkg/nodeagent/ztunnelserver_test.go

    	// as the kernel may have given us a different number that refers to the same file.
    	assert.Equal(t, len(fds), 1)
    	// in theory we should close the fd, but it's just a test..
    
    	assert.Equal(t, m.Payload.(*zdsapi.WorkloadRequest_Add).Add.Uid, uid)
    	// send ack so the server doesn't wait for us.
    	sendAck(ztunClient)
    
    	// second message should be the snap sent message
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Fri Apr 12 21:47:31 GMT 2024
    - 8.6K bytes
    - Viewed (0)
  3. utils/utils_test.go

    	}{
    		{"exists", []string{"1", "2", "3"}, "1", true},
    		{"not exists", []string{"1", "2", "3"}, "4", false},
    	}
    	for _, test := range containsTests {
    		t.Run(test.name, func(t *testing.T) {
    			if out := Contains(test.elems, test.elem); test.out != out {
    				t.Errorf("Contains(%v, %s) want: %t, got: %t", test.elems, test.elem, test.out, out)
    			}
    		})
    	}
    }
    
    type ModifyAt sql.NullTime
    
    // Value return a Unix time.
    Go
    - Registered: Sun Apr 28 09:35:09 GMT 2024
    - Last Modified: Mon Feb 19 03:42:25 GMT 2024
    - 3.6K bytes
    - Viewed (0)
  4. cni/pkg/util/podutil_test.go

    				Name:      "test",
    				Namespace: "test",
    				Labels:    ambientEnabledLabel,
    			},
    		}
    
    		unlabelledPod = &corev1.Pod{
    			ObjectMeta: metav1.ObjectMeta{
    				Name:      "test",
    				Namespace: "test",
    			},
    		}
    
    		podWithSidecar = &corev1.Pod{
    			ObjectMeta: metav1.ObjectMeta{
    				Name:        "test",
    				Namespace:   "test",
    				Annotations: sidecarStatusAnnotation,
    			},
    		}
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed May 01 18:04:40 GMT 2024
    - 5.9K bytes
    - Viewed (0)
  5. cmd/utils_test.go

    		{[]string{"abcd/foo/bar/", "abcd/foo/bar/zoo"}, "abcd/foo/bar/"},
    	}
    
    	for i, test := range testCases {
    		foundPrefix := lcp(test.prefixes, true)
    		if foundPrefix != test.commonPrefix {
    			t.Fatalf("Test %d: Common prefix found: `%v`, expected: `%v`", i+1, foundPrefix, test.commonPrefix)
    		}
    	}
    }
    
    func TestGetMinioMode(t *testing.T) {
    	testMinioMode := func(expected string) {
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Fri Feb 23 21:28:14 GMT 2024
    - 10.2K bytes
    - Viewed (0)
  6. internal/config/config_test.go

    		},
    	}
    	for _, test := range tests {
    		test := test
    		t.Run("", func(t *testing.T) {
    			gotFields := kvFields(test.input, test.keys)
    			if len(gotFields) != len(test.expectedFields) {
    				t.Errorf("Expected keys %d, found %d", len(test.expectedFields), len(gotFields))
    			}
    			found := true
    			for _, field := range gotFields {
    				_, ok := test.expectedFields[field]
    				found = found && ok
    			}
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Thu Aug 18 22:55:17 GMT 2022
    - 4.2K bytes
    - Viewed (0)
  7. src/bufio/scan_test.go

    func TestScanByte(t *testing.T) {
    	for n, test := range scanTests {
    		buf := strings.NewReader(test)
    		s := NewScanner(buf)
    		s.Split(ScanBytes)
    		var i int
    		for i = 0; s.Scan(); i++ {
    			if b := s.Bytes(); len(b) != 1 || b[0] != test[i] {
    				t.Errorf("#%d: %d: expected %q got %q", n, i, test, b)
    			}
    		}
    		if i != len(test) {
    			t.Errorf("#%d: termination expected at %d; got %d", n, len(test), i)
    		}
    		err := s.Err()
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Fri Sep 22 16:22:42 GMT 2023
    - 14.3K bytes
    - Viewed (0)
  8. istioctl/pkg/writer/envoy/configdump/route_test.go

    	"os"
    	"path"
    	"testing"
    
    	"istio.io/istio/pilot/test/util"
    	"istio.io/istio/pkg/test/util/assert"
    )
    
    func TestDescribeRouteDomains(t *testing.T) {
    	tests := []struct {
    		desc     string
    		domains  []string
    		expected string
    	}{
    		{
    			desc:     "test zero domain",
    			domains:  []string{},
    			expected: "",
    		},
    		{
    			desc:     "test only one domain",
    			domains:  []string{"example.com"},
    Go
    - Registered: Wed May 01 22:53:12 GMT 2024
    - Last Modified: Wed Nov 29 12:37:14 GMT 2023
    - 2.8K bytes
    - Viewed (0)
  9. src/archive/tar/writer_test.go

    					t.Errorf("test %d.%d, logicalRemaining() = %d, want %d", i, j, got, tf.wantLCnt)
    				}
    				if got := fw.physicalRemaining(); got != tf.wantPCnt {
    					t.Errorf("test %d.%d, physicalRemaining() = %d, want %d", i, j, got, tf.wantPCnt)
    				}
    			default:
    				t.Fatalf("test %d.%d, unknown test operation: %T", i, j, tf)
    			}
    		}
    
    		if got := bb.String(); got != wantStr {
    Go
    - Registered: Tue Apr 30 11:13:12 GMT 2024
    - Last Modified: Tue Feb 27 16:39:23 GMT 2024
    - 38.7K bytes
    - Viewed (0)
  10. internal/event/targetlist_test.go

    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			result := testCase.targetList.List()
    
    			if len(result) != len(testCase.expectedResult) {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, testCase.expectedResult, result)
    			}
    
    Go
    - Registered: Sun Apr 28 19:28:10 GMT 2024
    - Last Modified: Tue Dec 05 10:16:33 GMT 2023
    - 6.1K bytes
    - Viewed (0)
Back to top