Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 11 for expectedCert (0.18 sec)

  1. security/pkg/k8s/chiron/utils_test.go

    	testCases := map[string]struct {
    		certPath     string
    		shouldFail   bool
    		expectedCert []byte
    	}{
    		"cert not exist": {
    			certPath:   "./invalid-path/invalid-file",
    			shouldFail: true,
    		},
    		"cert valid": {
    			certPath:     "./test-data/example-ca-cert.pem",
    			shouldFail:   false,
    			expectedCert: []byte(exampleCACert),
    		},
    		"cert invalid": {
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Wed May 15 03:58:11 UTC 2024
    - 13K 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. cmd/kubeadm/app/constants/constants_test.go

    			svcSubnet:   "fd03::/112,",
    			expectedErr: true,
    		},
    	}
    	for _, rt := range tests {
    		t.Run(rt.name, func(t *testing.T) {
    			virtualIP, err := GetAPIServerVirtualIP(rt.svcSubnet)
    			if (err != nil) != rt.expectedErr {
    				t.Errorf("failed APIServerVirtualIP:\n\texpectedErr: %v, got: %v", rt.expectedErr, err)
    			} else if !rt.expectedErr {
    				if virtualIP.String() != rt.expectedIP {
    					t.Errorf(
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed May 29 03:26:36 UTC 2024
    - 10.7K bytes
    - Viewed (0)
  4. cmd/kubeadm/app/phases/upgrade/staticpods_test.go

    		skipKubeConfig       string
    		expectedErr          bool
    		manifestShouldChange bool
    	}{
    		{
    			description: "error-free case should succeed",
    			waitErrsToReturn: map[string]error{
    				waitForHashes:        nil,
    				waitForHashChange:    nil,
    				waitForPodsWithLabel: nil,
    			},
    			moveFileFunc:         os.Rename,
    			expectedErr:          false,
    			manifestShouldChange: true,
    		},
    		{
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 01 07:10:31 UTC 2024
    - 32K bytes
    - Viewed (0)
  5. pkg/scheduler/framework/plugins/tainttoleration/taint_toleration_test.go

    	testcases := map[string]struct {
    		pod            *v1.Pod
    		oldObj, newObj interface{}
    		expectedHint   framework.QueueingHint
    		expectedErr    bool
    	}{
    		"backoff-wrong-new-object": {
    			pod:          &v1.Pod{},
    			newObj:       "not-a-pod",
    			expectedHint: framework.Queue,
    			expectedErr:  true,
    		},
    		"backoff-wrong-old-object": {
    			pod:          &v1.Pod{},
    			oldObj:       "not-a-pod",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jun 12 13:26:09 UTC 2024
    - 17.5K bytes
    - Viewed (0)
  6. security/pkg/nodeagent/cache/secretcache_test.go

    		}
    		return expectedRootBytes
    	}
    
    	expectedCerts := concatCerts(string(rootCert), string(caClientRootCert))
    	// Ensure that contents of the rootCert are correct.
    	checkSecret(t, sc, security.RootCertReqResourceName, security.SecretItem{
    		ResourceName: security.RootCertReqResourceName,
    		RootCert:     expectedCerts,
    	})
    
    	// Add Duplicates
    	sc.UpdateConfigTrustBundle(expectedCerts)
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Thu May 16 22:12:28 UTC 2024
    - 23.9K bytes
    - Viewed (0)
  7. staging/src/k8s.io/apiserver/pkg/endpoints/handlers/rest_test.go

    		desc            string
    		requestBody     io.Reader
    		limit           int64
    		expectedMetrics string
    		expectedErr     bool
    	}{
    		{
    			desc:            "aaaa with limit 1",
    			requestBody:     strings.NewReader("aaaa"),
    			limit:           1,
    			expectedMetrics: "",
    			expectedErr:     true,
    		},
    		{
    			desc:        "aaaa with limit 5",
    			requestBody: strings.NewReader("aaaa"),
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Tue May 28 08:48:22 UTC 2024
    - 41.8K bytes
    - Viewed (0)
  8. cmd/object_api_suite_test.go

    		},
    	}
    
    	for i, testCase := range testCases {
    		_, expectedErr := obj.GetObjectInfo(context.Background(), bucketName, testCase.dir, opts)
    		if expectedErr != nil && expectedErr.Error() != testCase.err.Error() {
    			t.Errorf("Test %d, %s: Expected error %s, got %s", i+1, instanceType, testCase.err, expectedErr)
    		}
    	}
    }
    
    // Wrapper for calling testContentType for both Erasure and FS.
    Registered: Sun Jun 16 00:44:34 UTC 2024
    - Last Modified: Mon Jun 10 15:50:49 UTC 2024
    - 33.4K bytes
    - Viewed (0)
  9. src/net/http/request_test.go

    func TestRequestCookie(t *testing.T) {
    	for _, tt := range []struct {
    		name        string
    		value       string
    		expectedErr error
    	}{
    		{
    			name:        "foo",
    			value:       "bar",
    			expectedErr: nil,
    		},
    		{
    			name:        "",
    			expectedErr: ErrNoCookie,
    		},
    	} {
    		req, err := NewRequest("GET", "http://example.com/", nil)
    		if err != nil {
    			t.Fatal(err)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 16 18:42:34 UTC 2024
    - 44K bytes
    - Viewed (0)
  10. pkg/volume/util/atomic_writer_test.go

    			} else if err != nil {
    				t.Fatalf("%v: unable to read symlink %v: %v", tc.name, dataDirPath, err)
    			}
    
    			if expectedDest != destination {
    				t.Fatalf("%v: symlink destination %q not same with expected data dir %q", tc.name, destination, expectedDest)
    			}
    		}
    	}
    }
    
    func TestSetPerms(t *testing.T) {
    	targetDir, err := utiltesting.MkTmpdir("atomic-write")
    	if err != nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat May 11 09:02:45 UTC 2024
    - 30.5K bytes
    - Viewed (0)
Back to top