Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 20 for wantErrors (0.42 sec)

  1. pkg/apis/certificates/validation/validation_test.go

    		badTooBigBundle += goodCert1Block + "\n"
    	}
    
    	testCases := []struct {
    		description string
    		bundle      *capi.ClusterTrustBundle
    		opts        ValidateClusterTrustBundleOptions
    		wantErrors  field.ErrorList
    	}{
    		{
    			description: "valid, no signer name",
    			bundle: &capi.ClusterTrustBundle{
    				ObjectMeta: metav1.ObjectMeta{
    					Name: "foo",
    				},
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 03 18:40:49 UTC 2023
    - 61K bytes
    - Viewed (0)
  2. src/cmd/link/internal/ld/ld_test.go

    		if strings.HasPrefix(l, "#") || l == "" {
    			continue
    		}
    		matched := ""
    		for want := range wantErrors {
    			if strings.Contains(l, want) {
    				matched = want
    				break
    			}
    		}
    		if matched != "" {
    			wantErrors[matched]--
    		} else {
    			unexpectedErrors[l]++
    		}
    	}
    
    	for want, n := range wantErrors {
    		switch {
    		case n > 0:
    			t.Errorf("unmatched error: %s (x%d)", want, n)
    		case n < 0:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Oct 13 05:45:53 UTC 2023
    - 10.3K bytes
    - Viewed (0)
  3. pkg/config/validation/agent/validation_test.go

    			// each field must cause an error in the field
    			if len(err.Errors) != len(wantErrors) {
    				t.Errorf("expected %d errors but found %v", len(wantErrors), err)
    			} else {
    				for i := 0; i < len(wantErrors); i++ {
    					if !strings.HasPrefix(err.Errors[i].Error(), wantErrors[i]) {
    						t.Errorf("expected error %q at index %d but found %q", wantErrors[i], i, err.Errors[i])
    					}
    				}
    			}
    		default:
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed Apr 17 20:06:41 UTC 2024
    - 39.1K bytes
    - Viewed (0)
  4. pkg/config/security/security_test.go

    			values:    []string{"80", "x"},
    			wantError: true,
    		},
    		{
    			key:       "destination.labels[app]",
    			values:    []string{"value"},
    			wantError: true,
    		},
    		{
    			key:       "destination.name",
    			values:    []string{"value"},
    			wantError: true,
    		},
    		{
    			key:       "destination.namespace",
    			values:    []string{"value"},
    			wantError: true,
    		},
    		{
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Sat Apr 20 01:58:53 UTC 2024
    - 8.3K bytes
    - Viewed (0)
  5. pkg/controller/nodeipam/ipam/sync/sync_test.go

    			events:    []fakeEvent{{"node1", "CloudCIDRAllocatorInvalidMode"}},
    			wantError: true,
    		},
    		{
    			desc:      "allocate range",
    			mode:      SyncFromCloud,
    			node:      nodeWithoutCIDRRange,
    			events:    []fakeEvent{{"node1", "CloudCIDRAllocatorInvalidMode"}},
    			wantError: true,
    		},
    		{
    			desc: "allocate range",
    			mode: SyncFromCluster,
    			node: nodeWithoutCIDRRange,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jul 05 23:39:52 UTC 2023
    - 7.6K bytes
    - Viewed (0)
  6. istioctl/pkg/validate/validate_test.go

    			wantError: false,
    		},
    		{
    			name:      "invalid port naming service",
    			args:      []string{"--filename", invalidPortNamingSvcFile},
    			wantError: true,
    		},
    		{
    			name:      "filename missing",
    			wantError: true,
    		},
    		{
    			name: "valid resources from file",
    			args: []string{"--filename", validFilenameYAML},
    		},
    		{
    			name:      "extra args",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Tue Jul 25 08:08:36 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  7. pkg/webhooks/validation/controller/controller_test.go

    		name      string
    		cert      []byte
    		wantError bool
    	}{
    		{
    			name:      "valid pem",
    			cert:      testcerts.CACert,
    			wantError: false,
    		},
    		{
    			name:      "pem decode error",
    			cert:      append([]byte("-----codec"), testcerts.CACert...),
    			wantError: true,
    		},
    		{
    			name:      "pem wrong type",
    			wantError: true,
    		},
    		{
    			name:      "invalid x509",
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jan 05 03:21:04 UTC 2024
    - 11.8K bytes
    - Viewed (0)
  8. pkg/filewatcher/fakefilewatcher_test.go

    		if gotEvent != wantEvent {
    			t.Fatalf("Events() failed: got %v want %v", gotEvent, wantEvent)
    		}
    
    		wantError := fmt.Errorf("error=%v", file)
    		fakeWatcher.InjectError(file, wantError)
    		gotError := <-watcher.Errors(file)
    		if gotError != wantError {
    			t.Fatalf("Errors() failed: got %v want %v", gotError, wantError)
    		}
    
    		if err := watcher.Remove(file); err != nil {
    			t.Fatalf("Remove() returned error: %v", err)
    		}
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 24 14:06:41 UTC 2023
    - 3.8K bytes
    - Viewed (0)
  9. cmd/kubeadm/app/componentconfigs/utils_test.go

    				t.Errorf("UnsupportedConfigVersionsErrorMap.Error() = %v\n, want %v", got, tt.wantErrorMap)
    			}
    			if tt.wantError != "" {
    				for _, err := range tt.errs {
    					if got := err.Error(); got != tt.wantError {
    						t.Errorf("UnsupportedConfigVersionError.Error() = %v\n, want %v", got, tt.wantError)
    						break
    					}
    				}
    			}
    		})
    	}
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue Jan 09 13:52:11 UTC 2024
    - 3.1K bytes
    - Viewed (0)
  10. pilot/pkg/request/command_test.go

    			pilotNotReachable: true,
    			wantError:         true,
    		},
    		{
    			name:   "errors if Pilot responds with a non success status",
    			method: "GET",
    			path:   "/not/wanted/path",
    			body:   "",
    			pilotStates: []pilotStubState{
    				{StatusCode: 200, Response: "fine", wantMethod: "GET", wantPath: "/want/path", wantBody: nil},
    			},
    			wantError: true,
    		},
    	}
    	for _, tt := range tests {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Mon Dec 11 19:11:01 UTC 2023
    - 4.1K bytes
    - Viewed (0)
Back to top