Search Options

Results per page
Sort
Preferred Languages
Advance

Results 71 - 80 of 420 for tc (0.03 sec)

  1. callbacks/helper_test.go

    				Columns: []clause.Column{{Name: "active"}},
    				Values:  [][]interface{}{{true}},
    			},
    		},
    	}
    
    	for _, tc := range testCase {
    		t.Run(tc.name, func(t *testing.T) {
    			actual := ConvertMapToValuesForCreate(&gorm.Statement{}, tc.input)
    			if !reflect.DeepEqual(actual, tc.expect) {
    				t.Errorf("expect %v got %v", tc.expect, actual)
    			}
    		})
    	}
    }
    
    func TestConvertSliceOfMapToValuesForCreate(t *testing.T) {
    Registered: Wed Jun 12 16:27:09 UTC 2024
    - Last Modified: Tue Mar 05 02:22:57 UTC 2024
    - 3.4K bytes
    - Viewed (0)
  2. security/pkg/k8s/configutil_test.go

    			err := updateDataInConfigMap(configmaps, tc.existingConfigMap, []byte(caBundle))
    			if err != nil && err.Error() != tc.expectedErr {
    				t.Errorf("actual error (%s) different from expected error (%s).", err.Error(), tc.expectedErr)
    			}
    			if err == nil {
    				if tc.expectedErr != "" {
    					t.Errorf("expecting error %s but got no error", tc.expectedErr)
    				} else if err := checkActions(fake.Actions(), tc.expectedActions); err != nil {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Feb 08 21:58:25 UTC 2024
    - 13K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apiserver/pkg/admission/plugin/cel/filter_test.go

    		},
    	}
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			c := filterCompiler{compiler: NewCompiler(environment.MustBaseEnvSet(environment.DefaultCompatibilityVersion(), tc.enableStrictCostEnforcement))}
    			f := c.Compile(tc.validations, OptionalVariableDeclarations{HasParams: tc.hasParamKind, HasAuthorizer: true, StrictCost: tc.enableStrictCostEnforcement}, environment.NewExpressions)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 40.4K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/util/config/common_test.go

    		},
    	}
    
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			err := tc.mutators.mutate(tc.input)
    			if (err != nil) != tc.expectedError {
    				t.Fatalf("expected error: %v, got: %v, error: %v", tc.expectedError, (err != nil), err)
    			}
    			if err != nil {
    				return
    			}
    			diff := cmp.Diff(tc.expected, tc.input)
    			if (len(diff) > 0) != tc.expectedDiff {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Feb 29 05:14:21 UTC 2024
    - 23.4K bytes
    - Viewed (0)
  5. pkg/kubelet/container/helpers_test.go

    			},
    			0x11a6d6d6,
    		},
    	}
    	for _, tc := range tests {
    		t.Run(tc.name, func(t *testing.T) {
    			containerCopy := tc.container.DeepCopy()
    			hash := HashContainer(tc.container)
    			assert.Equal(t, tc.expectedHash, hash, "[%s]", tc.name)
    			assert.Equal(t, containerCopy, tc.container, "[%s]", tc.name)
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 22 01:55:46 UTC 2024
    - 24.5K bytes
    - Viewed (0)
  6. pkg/slices/slices_test.go

    		},
    		{
    			name:  "EmptySlice",
    			slice: []int{},
    			v:     1,
    			want:  false,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			if got := Contains(tc.slice, tc.v); got != tc.want {
    				t.Errorf("Contains(%v, %v) = %v; want %v", tc.slice, tc.v, got, tc.want)
    			}
    		})
    	}
    }
    
    func TestFindFunc(t *testing.T) {
    	emptyElement := []string{}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 10 23:33:56 UTC 2024
    - 18.2K bytes
    - Viewed (0)
  7. pkg/controller/volume/attachdetach/attach_detach_controller_test.go

    	if tc.podName != "" {
    		newPod := controllervolumetesting.NewPodWithVolume(tc.podName, tc.volName, tc.podNodeName)
    		_, err = adc.kubeClient.CoreV1().Pods(newPod.ObjectMeta.Namespace).Create(tCtx, newPod, metav1.CreateOptions{})
    		if err != nil {
    			t.Fatalf("Run failed with error. Failed to create a new pod: <%v>", err)
    		}
    		podInformer.GetIndexer().Add(newPod)
    	}
    	if tc.pvName != "" {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 18 11:00:37 UTC 2024
    - 24.2K bytes
    - Viewed (0)
  8. src/internal/syscall/unix/siginfo_linux_test.go

    		{"Pid", unsafe.Offsetof(si.Pid), ofPid},
    		{"Uid", unsafe.Offsetof(si.Uid), ofUid},
    		{"Status", unsafe.Offsetof(si.Status), ofStatus},
    	}
    
    	for _, tc := range offsets {
    		if int(tc.got) != tc.want {
    			t.Errorf("offsetof %s: got %d, want %d", tc.name, tc.got, tc.want)
    		}
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 01:23:00 UTC 2024
    - 1.3K bytes
    - Viewed (0)
  9. src/image/gif/reader_test.go

    		// byte, and 2-bit LZW literals.
    		b.WriteString("\x2c\x00\x00\x00\x00\x02\x00\x01\x00\x00\x02")
    		if tc.nPix > 0 {
    			enc := lzwEncode(make([]byte, tc.nPix))
    			if len(enc)+tc.extraExisting > 0xff {
    				t.Errorf("nPix=%d, extraExisting=%d, extraSeparate=%d: compressed length %d is too large",
    					tc.nPix, tc.extraExisting, tc.extraSeparate, len(enc))
    				continue
    			}
    
    			// Write the size of the data sub-block containing the LZW data.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 11 16:15:54 UTC 2024
    - 13.3K bytes
    - Viewed (0)
  10. pkg/controller/statefulset/stateful_set_utils_test.go

    			new:     []string{"v1/set/bob", "v1/pod/foo"},
    			changed: false,
    		},
    	}
    	for _, tc := range testCases {
    		if ownerRefsChanged(toRefs(tc.orig), toRefs(tc.new)) != tc.changed {
    			t.Errorf("Expected change=%t but got %t for %v vs %v", tc.changed, !tc.changed, tc.orig, tc.new)
    		}
    	}
    }
    
    func TestGetParentNameAndOrdinal(t *testing.T) {
    	set := newStatefulSet(3)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 05 19:06:41 UTC 2024
    - 50.9K bytes
    - Viewed (0)
Back to top