Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 422 for tc (0.1 sec)

  1. pkg/kubelet/util/swap/swap_util_test.go

    		{
    			name: "empty lines",
    			procSwapsContent: `
    
    `,
    			expectedEnabled: false,
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			isEnabled := isSwapOnAccordingToProcSwaps([]byte(tc.procSwapsContent))
    			if isEnabled != tc.expectedEnabled {
    				t.Errorf("expected %v, got %v", tc.expectedEnabled, isEnabled)
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 21 10:18:16 UTC 2024
    - 1.6K bytes
    - Viewed (0)
  2. pkg/scheduler/framework/plugins/dynamicresources/structured/namedresources/namedresourcesmodel_test.go

    		},
    	}
    
    	for name, tc := range testcases {
    		t.Run(name, func(t *testing.T) {
    			tCtx := ktesting.Init(t)
    
    			controller, createErr := NewClaimController(tc.filter, tc.requests)
    			if createErr != nil {
    				if !tc.expectCreateErr {
    					tCtx.Fatalf("unexpected create error: %v", createErr)
    				}
    				return
    			}
    			if tc.expectCreateErr {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 27 09:27:01 UTC 2024
    - 7.9K bytes
    - Viewed (0)
  3. pkg/kubelet/eviction/memory_threshold_notifier_test.go

    			notifier.EXPECT().Start(events).Return().AnyTimes()
    			err := m.UpdateThreshold(nodeSummary(tc.available, tc.workingSet, tc.usage, isAllocatableEvictionThreshold(tc.evictionThreshold)))
    			if err != nil && !tc.expectErr {
    				t.Errorf("Unexpected error updating threshold: %v", err)
    			} else if err == nil && tc.expectErr {
    				t.Errorf("Expected error updating threshold, but got nil")
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 08:12:16 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  4. pkg/proxy/conntrack/cleanup_test.go

    			},
    		},
    	}
    
    	for _, tc := range testCases {
    		t.Run(tc.description, func(t *testing.T) {
    			fake := NewFake()
    			CleanStaleEntries(fake, svcPortMap, tc.serviceUpdates, tc.endpointsUpdates)
    			if !fake.ClearedIPs.Equal(tc.result.ClearedIPs) {
    				t.Errorf("Expected ClearedIPs=%v, got %v", tc.result.ClearedIPs, fake.ClearedIPs)
    			}
    			if !fake.ClearedPorts.Equal(tc.result.ClearedPorts) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 15 18:09:05 UTC 2024
    - 7.6K bytes
    - Viewed (0)
  5. cmd/kubeadm/app/cmd/token_test.go

    		},
    	}
    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			token := outputapiv1alpha3.BootstrapToken{
    				BootstrapToken: bootstraptokenv1.BootstrapToken{
    					Token:       &bootstraptokenv1.BootstrapTokenString{ID: tc.id, Secret: tc.secret},
    					Description: tc.description,
    					Usages:      tc.usages,
    					Groups:      tc.extraGroups,
    				},
    			}
    			buf := bytes.Buffer{}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Apr 23 05:47:48 UTC 2024
    - 13.6K bytes
    - Viewed (0)
  6. pkg/kubelet/volumemanager/reconciler/reconstruct_test.go

    			if !reflect.DeepEqual(sets.List(volumesFailedReconstruction), tc.expectedVolumesFailedReconstruction) {
    				t.Errorf("Expected volumesFailedReconstruction:\n%v\n got:\n%v", tc.expectedVolumesFailedReconstruction, sets.List(volumesFailedReconstruction))
    			}
    
    			if tc.verifyFunc != nil {
    				if err := tc.verifyFunc(rcInstance, fakePlugin); err != nil {
    					t.Errorf("Test %s failed: %v", tc.name, err)
    				}
    			}
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 14.8K bytes
    - Viewed (0)
  7. pkg/kubelet/network/dns/dns_test.go

    		},
    	}
    
    	for _, tc := range testCases {
    		options := mergeDNSOptions(tc.existingDNSConfigOptions, tc.dnsConfigOptions)
    		// Options order may be changed after conversion.
    		if !sets.New[string](options...).Equal(sets.New[string](tc.expectedOptions...)) {
    			t.Errorf("%s: mergeDNSOptions(%v, %v)=%v, want %v", tc.desc, tc.existingDNSConfigOptions, tc.dnsConfigOptions, options, tc.expectedOptions)
    		}
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jun 04 06:25:43 UTC 2024
    - 25.6K bytes
    - Viewed (0)
  8. pkg/kubelet/userns/userns_manager_test.go

    	assert.NoError(t, err)
    
    	for _, tc := range cases {
    		t.Run(tc.name, func(t *testing.T) {
    			// We don't validate the result. It was parsed with the json parser, we trust that.
    			_, err = m.parseUserNsFileAndRecord(types.UID(tc.name), []byte(tc.file))
    			if (tc.success && err == nil) || (!tc.success && err != nil) {
    				return
    			}
    
    			t.Errorf("expected success: %v but got error: %v", tc.success, err)
    		})
    	}
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Apr 25 14:24:16 UTC 2024
    - 14.6K bytes
    - Viewed (0)
  9. pkg/volume/csi/csi_plugin_test.go

    			shouldFail: true,
    		},
    	}
    
    	for _, tc := range testCases {
    		// Arrange & Act
    		err := PluginHandler.ValidatePlugin(tc.pluginName, tc.endpoint, tc.versions)
    
    		// Assert
    		if tc.shouldFail && err == nil {
    			t.Fatalf("expecting ValidatePlugin to fail, but got nil error for testcase: %#v", tc)
    		}
    		if !tc.shouldFail && err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  10. staging/src/k8s.io/apiserver/pkg/authentication/cel/compile_test.go

    	for _, tc := range testCases {
    		t.Run(tc.name, func(t *testing.T) {
    			for _, expressionAccessor := range tc.expressionAccessors {
    				_, err := compiler.CompileClaimsExpression(expressionAccessor)
    				if err == nil {
    					t.Errorf("expected error but got nil")
    				}
    				if !strings.Contains(err.Error(), tc.wantErr) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri May 10 22:07:40 UTC 2024
    - 7.3K bytes
    - Viewed (0)
Back to top