Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 21 for ParseConfig (0.11 sec)

  1. internal/bucket/replication/replication_test.go

    			expectedValidationErr: nil,
    		},
    	}
    	for i, tc := range testCases {
    		t.Run(fmt.Sprintf("Test %d", i+1), func(t *testing.T) {
    			cfg, err := ParseConfig(bytes.NewReader([]byte(tc.inputConfig)))
    			if err != nil && tc.expectedParsingErr != nil && err.Error() != tc.expectedParsingErr.Error() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Mar 28 17:44:56 UTC 2024
    - 32.5K bytes
    - Viewed (0)
  2. cni/pkg/plugin/plugin_dryrun_test.go

    }
    
    func testdoAddRunWithIptablesIntercept(t *testing.T, stdinData, testPodName, testNSName string, objects ...runtime.Object) {
    	args := buildCmdArgs(stdinData, testPodName, testNSName)
    
    	conf, err := parseConfig(args.StdinData)
    	if err != nil {
    		t.Fatalf("config parse failed with error: %v", err)
    	}
    
    	// Create a kube client
    	client := kube.NewFakeClient(objects...)
    
    Registered: Wed Nov 06 22:53:10 UTC 2024
    - Last Modified: Tue Aug 27 16:44:45 UTC 2024
    - 8.5K bytes
    - Viewed (0)
  3. cmd/admin-bucket-handlers.go

    		if fileName == bucketVersioningConfig {
    			reader, err := file.Open()
    			if err != nil {
    				rpt.SetStatus(bucket, fileName, err)
    				continue
    			}
    			v, err := versioning.ParseConfig(io.LimitReader(reader, maxBucketVersioningConfigSize))
    			if err != nil {
    				rpt.SetStatus(bucket, fileName, err)
    				continue
    			}
    			if _, ok := bucketMap[bucket]; !ok {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Wed Aug 28 15:32:18 UTC 2024
    - 33.2K bytes
    - Viewed (0)
  4. cmd/iam.go

    	if ptok && spok && pt == embeddedPolicyType {
    		policyBytes, err := base64.StdEncoding.DecodeString(sp)
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    		embeddedPolicy, err = policy.ParseConfig(bytes.NewReader(policyBytes))
    		if err != nil {
    			return UserIdentity{}, nil, err
    		}
    	}
    
    	return sa, embeddedPolicy, nil
    }
    
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Oct 29 16:01:48 UTC 2024
    - 74.6K bytes
    - Viewed (0)
  5. internal/event/config_test.go

    		{reader2, "us-east-1", targetList2, false},
    	}
    
    	for i, testCase := range testCases {
    		if _, err := testCase.reader.Seek(0, 0); err != nil {
    			panic(err)
    		}
    		_, err := ParseConfig(testCase.reader, testCase.region, testCase.targetList)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Tue Dec 05 10:16:33 UTC 2023
    - 29K bytes
    - Viewed (0)
  6. cmd/admin-handlers-site-replication.go

    	case madmin.SRIAMItemPolicy:
    		if item.Policy == nil {
    			err = globalSiteReplicationSys.PeerAddPolicyHandler(ctx, item.Name, nil, item.UpdatedAt)
    		} else {
    			policy, perr := policy.ParseConfig(bytes.NewReader(item.Policy))
    			if perr != nil {
    				writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, perr), r.URL)
    				return
    			}
    			if policy.IsEmpty() {
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Fri May 24 23:05:23 UTC 2024
    - 19.4K bytes
    - Viewed (0)
  7. cmd/bucket-replication-handlers.go

    	}
    	if versioned := globalBucketVersioningSys.Enabled(bucket); !versioned {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrReplicationNeedsVersioningError), r.URL)
    		return
    	}
    	replicationConfig, err := replication.ParseConfig(io.LimitReader(r.Body, r.ContentLength))
    	if err != nil {
    		apiErr := errorCodes.ToAPIErr(ErrMalformedXML)
    		apiErr.Description = err.Error()
    		writeErrorResponse(ctx, w, apiErr, r.URL)
    		return
    	}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 23.3K bytes
    - Viewed (0)
  8. cmd/admin-handlers-users.go

    	}) {
    		writeErrorResponseJSON(ctx, w, errorCodes.ToAPIErr(ErrAccessDenied), r.URL)
    		return
    	}
    
    	var sp *policy.Policy
    	if len(updateReq.NewPolicy) > 0 {
    		sp, err = policy.ParseConfig(bytes.NewReader(updateReq.NewPolicy))
    		if err != nil {
    			writeErrorResponseJSON(ctx, w, toAdminAPIErr(ctx, err), r.URL)
    			return
    		}
    		if sp.Version == "" && len(sp.Statements) == 0 {
    			sp = nil
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Oct 03 23:11:02 UTC 2024
    - 85.1K bytes
    - Viewed (0)
  9. cmd/kms-handlers_test.go

    	if err != nil {
    		t.Fatal(err)
    	}
    
    	testKMSPolicyName := "testKMSPolicy"
    	if p != "" {
    		p = `{"Version":"2012-10-17","Statement":[` + p + `]}`
    		policyData, err := policy.ParseConfig(strings.NewReader(p))
    		if err != nil {
    			t.Fatal(err)
    		}
    		_, err = globalIAMSys.SetPolicy(ctx, testKMSPolicyName, *policyData)
    		if err != nil {
    			t.Fatal(err)
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Sun Aug 18 06:43:03 UTC 2024
    - 22.3K bytes
    - Viewed (0)
  10. cmd/site-replication.go

    		// do some validation.
    		newReplCfgBytes, err := xml.Marshal(replicationConfig)
    		if err != nil {
    			return err
    		}
    		newReplicationConfig, err := sreplication.ParseConfig(bytes.NewReader(newReplCfgBytes))
    		if err != nil {
    			return err
    		}
    Registered: Sun Nov 03 19:28:11 UTC 2024
    - Last Modified: Thu Aug 15 12:04:40 UTC 2024
    - 185.1K bytes
    - Viewed (0)
Back to top