Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 29 for IsValid (0.33 sec)

  1. cmd/bucket-lifecycle_test.go

    			t.Fatalf("Test %d: expected %v but got %v for %v", i+1, tc.ondisk, actual, tc.meta)
    		}
    	}
    }
    
    func TestObjectIsRemote(t *testing.T) {
    	fi := newFileInfo("object", 8, 8)
    	fi.Erasure.Index = 1
    	if !fi.IsValid() {
    		t.Fatalf("unable to get xl meta")
    	}
    
    	testCases := []struct {
    		meta   map[string]string
    		remote bool
    	}{
    		{
    			// restore in progress
    			meta: map[string]string{
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue May 31 09:57:57 GMT 2022
    - 7K bytes
    - Viewed (0)
  2. cmd/iam.go

    	atomic.StoreUint64(&sys.LastRefreshTimeUnixNano, uint64(loadStartTime.Add(loadDuration).UnixNano()))
    	atomic.AddUint64(&sys.TotalRefreshSuccesses, 1)
    
    	if !globalSiteReplicatorCred.IsValid() {
    		sa, _, err := sys.getServiceAccount(ctx, siteReplicatorSvcAcc)
    		if err == nil {
    			globalSiteReplicatorCred.Set(sa.Credentials)
    		}
    	}
    
    	if firstTime {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Apr 25 21:28:16 GMT 2024
    - 71.1K bytes
    - Viewed (1)
  3. cmd/erasure-healing-common_test.go

    	}
    
    	// Iterate through all the modTimes and count the FileInfo(s) with latest time.
    	for index, t := range modTimes {
    		if partsMetadata[index].IsValid() && t.Equal(modTime) {
    			latestFileInfo = partsMetadata[index]
    			count++
    		}
    	}
    
    	if !latestFileInfo.IsValid() {
    		return FileInfo{}, errErasureReadQuorum
    	}
    
    	if count < latestFileInfo.Erasure.DataBlocks {
    		return FileInfo{}, errErasureReadQuorum
    	}
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 23K bytes
    - Viewed (1)
  4. cmd/object-handlers.go

    		return
    	}
    
    	// Validate storage class metadata if present
    	dstSc := r.Header.Get(xhttp.AmzStorageClass)
    	if dstSc != "" && !storageclass.IsValid(dstSc) {
    		writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidStorageClass), r.URL)
    		return
    	}
    
    	// Check if bucket encryption is enabled
    	sseConfig, _ := globalBucketSSEConfigSys.Get(dstBucket)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu May 02 20:15:54 GMT 2024
    - 125.2K bytes
    - Viewed (0)
  5. cmd/object-multipart-handlers.go

    	sseConfig.Apply(r.Header, sse.ApplyOptions{
    		AutoEncrypt: globalAutoEncryption,
    	})
    
    	// Validate storage class metadata if present
    	if sc := r.Header.Get(xhttp.AmzStorageClass); sc != "" {
    		if !storageclass.IsValid(sc) {
    			writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrInvalidStorageClass), r.URL)
    			return
    		}
    	}
    
    	encMetadata := map[string]string{}
    
    	if crypto.Requested(r.Header) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Mar 28 17:44:56 GMT 2024
    - 39K bytes
    - Viewed (0)
  6. cmd/iam-store.go

    	}
    
    	// When looking for a user's policies, we also check if the user
    	// and the groups they are member of are enabled.
    	u, ok := c.iamUsersMap[name]
    	if ok {
    		if !u.Credentials.IsValid() {
    			return nil, time.Time{}, nil
    		}
    	}
    
    	// For internal IDP regular/service account user accounts, the policy
    	// mapping is iamUserPolicyMap. For STS accounts, the parent user would be
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Sat Apr 27 10:04:10 GMT 2024
    - 75.2K bytes
    - Viewed (2)
  7. cmd/site-replication.go

    }
    
    func (s *siteReplicatorCred) Set(c auth.Credentials) {
    	s.Lock()
    	defer s.Unlock()
    	s.Creds = c
    }
    
    func (s *siteReplicatorCred) IsValid() bool {
    	s.RLock()
    	defer s.RUnlock()
    	return s.Creds.IsValid()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:09:56 GMT 2024
    - 184.2K bytes
    - Viewed (1)
  8. cmd/erasure-healing-common.go

    			for index, e := range etags {
    				if partsMetadata[index].IsValid() && e == etag {
    					onlineDisks[index] = disks[index]
    				} else {
    					onlineDisks[index] = nil
    				}
    			}
    			return onlineDisks, modTime, etag
    		}
    	}
    
    	// Create a new online disks slice, which have common uuid.
    	for index, t := range modTimes {
    		if partsMetadata[index].IsValid() && t.Equal(modTime) {
    			onlineDisks[index] = disks[index]
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 10.8K bytes
    - Viewed (0)
  9. cmd/erasure-metadata_test.go

    		{7, 4},
    		// Insert part.
    		{3, 2},
    		// Replace existing part.
    		{4, 3},
    		// Missing part.
    		{6, -1},
    	}
    
    	// Setup.
    	fi := newFileInfo("test-object", 8, 8)
    	fi.Erasure.Index = 1
    	if !fi.IsValid() {
    		t.Fatalf("unable to get xl meta")
    	}
    
    	// Test them.
    	for _, testCase := range testCases {
    		if testCase.expectedIndex > -1 {
    			partNumString := strconv.Itoa(testCase.partNum)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Apr 26 00:31:12 GMT 2024
    - 9.1K bytes
    - Viewed (0)
  10. internal/config/storageclass/storage-class_test.go

    			continue
    		}
    		if parity != tt.expectedParity {
    			t.Errorf("Test %d, Expected parity drives %d, got %d", i+1, tt.expectedParity, parity)
    		}
    	}
    }
    
    // Test IsValid method with valid and invalid inputs
    func TestIsValidStorageClassKind(t *testing.T) {
    	tests := []struct {
    		sc   string
    		want bool
    	}{
    		{"STANDARD", true},
    		{"REDUCED_REDUNDANCY", true},
    		{"", false},
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Aug 15 23:04:20 GMT 2023
    - 4.3K bytes
    - Viewed (0)
Back to top