Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 104 for expectedCert (0.16 sec)

  1. security/pkg/util/certutil_test.go

    		waitTime, err := cu.GetWaitTime(c.cert, c.now)
    		if c.expectedErr != "" {
    			if err == nil {
    				t.Errorf("%s: no error is returned.", id)
    			}
    			if err.Error() != c.expectedErr {
    				t.Errorf("%s: incorrect error message: %s VS %s", id, err.Error(), c.expectedErr)
    			}
    		} else {
    			if err != nil {
    				t.Errorf("%s: unexpected error: %v", id, err)
    			}
    			if int(waitTime.Seconds()) != c.expectedWaitTime {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu Nov 30 19:33:26 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  2. cmd/erasure-metadata_test.go

    	}
    
    	// Test them.
    	for _, testCase := range testCases {
    		index, offset, err := fi.ObjectToPartOffset(context.Background(), testCase.offset)
    		if err != testCase.expectedErr {
    			t.Fatalf("%+v: expected = %s, got: %s", testCase, testCase.expectedErr, err)
    		}
    		if index != testCase.expectedIndex {
    			t.Fatalf("%+v: index: expected = %d, got: %d", testCase, testCase.expectedIndex, index)
    		}
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Fri May 17 20:57:37 UTC 2024
    - 10.4K bytes
    - Viewed (0)
  3. internal/bucket/object/lock/lock_test.go

    		err = xml.Unmarshal(d, &dr)
    		//nolint:gocritic
    		if tt.expectedErr == nil {
    			if err != nil {
    				t.Fatalf("error: expected = <nil>, got = %v", err)
    			}
    		} else if err == nil {
    			t.Fatalf("error: expected = %v, got = <nil>", tt.expectedErr)
    		} else if tt.expectedErr.Error() != err.Error() {
    			t.Fatalf("error: expected = %v, got = %v", tt.expectedErr, err)
    		}
    	}
    }
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Feb 22 06:26:06 UTC 2024
    - 17.1K bytes
    - Viewed (0)
  4. security/pkg/util/jwtutil_test.go

    			expectedExp: time.Time{},
    			expectedErr: fmt.Errorf("failed to decode the JWT claims"),
    		},
    	}
    
    	for id, tc := range testCases {
    		t.Run(id, func(t *testing.T) {
    			exp, err := GetExp(tc.jwt)
    			if err != nil && tc.expectedErr == nil || err == nil && tc.expectedErr != nil {
    				t.Errorf("%s: Got error \"%v\", expected error \"%v\"", id, err, tc.expectedErr)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri May 31 16:07:11 UTC 2024
    - 6K bytes
    - Viewed (0)
  5. cmd/server-main_test.go

    		config      string
    		expectedErr bool
    		hash        string
    	}{
    		{
    			config:      "testdata/config/1.yaml",
    			expectedErr: false,
    			hash:        "hash:02bf70285dc71f76",
    		},
    		{
    			config:      "testdata/config/2.yaml",
    			expectedErr: false,
    			hash:        "hash:676d2da00f71f205",
    		},
    		{
    			config:      "testdata/config/invalid.yaml",
    			expectedErr: true,
    		},
    		{
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Dec 07 09:33:56 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  6. cmd/kube-scheduler/app/options/configfile_test.go

    		path           string
    		expectedErr    error
    		expectedConfig *config.KubeSchedulerConfiguration
    	}{
    		{
    			name:           "Empty scheduler config file path",
    			path:           "",
    			expectedErr:    syscall.Errno(syscall.ENOENT),
    			expectedConfig: nil,
    		},
    		{
    			name:           "Correct scheduler config",
    			path:           correctConfigFile,
    			expectedErr:    nil,
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jan 22 13:43:42 UTC 2024
    - 3.6K bytes
    - Viewed (0)
  7. cmd/kubeadm/app/util/arguments_test.go

    		expectedKey string
    		expectedVal string
    		expectedErr bool
    	}{
    		{
    			name:        "arg cannot be empty",
    			arg:         "",
    			expectedErr: true,
    		},
    		{
    			name:        "arg must contain -- and =",
    			arg:         "a",
    			expectedErr: true,
    		},
    		{
    			name:        "arg must contain -- and =",
    			arg:         "a-z",
    			expectedErr: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Aug 16 10:27:05 UTC 2023
    - 8.9K bytes
    - Viewed (0)
  8. pkg/kubelet/cm/cpumanager/policy_options_test.go

    		topology      *topology.CPUTopology
    		topoMgrPolicy string
    		expectedErr   bool
    	}{
    		{
    			description:   "Align by socket not enabled",
    			policyOption:  map[string]string{FullPCPUsOnlyOption: "true"},
    			topology:      topoDualSocketMultiNumaPerSocketHT,
    			topoMgrPolicy: topologymanager.PolicySingleNumaNode,
    			expectedErr:   false,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Apr 24 18:25:29 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  9. cmd/xl-storage_test.go

    	testCases := []struct {
    		volName     string
    		expectedErr error
    	}{
    		// TestXLStorage case - 1.
    		{
    			volName:     "success-vol",
    			expectedErr: nil,
    		},
    		// TestXLStorage case - 2.
    		{
    			volName:     "nonexistent-vol",
    			expectedErr: errVolumeNotFound,
    		},
    		// TestXLStorage case - 3.
    		{
    			volName:     "ab",
    			expectedErr: errVolumeNotFound,
    		},
    	}
    
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Thu Apr 11 17:45:28 UTC 2024
    - 66.7K bytes
    - Viewed (0)
  10. internal/bucket/lifecycle/rule_test.go

    	                    </Rule>`,
    			expectedErr: errInvalidRuleID,
    		},
    		{ // Rule with empty ID
    			inputXML: `<Rule>
    							<ID></ID>
    							<Filter><Prefix></Prefix></Filter>
    							<Expiration>
    								<Days>365</Days>
    							</Expiration>
                                <Status>Enabled</Status>
    	                    </Rule>`,
    			expectedErr: nil,
    		},
    		{ // Rule with empty status
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Wed May 01 01:11:10 UTC 2024
    - 4.9K bytes
    - Viewed (0)
Back to top