Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for texts (0.15 sec)

  1. internal/bucket/object/lock/lock_test.go

    }
    
    func TestParseLegalHoldStatus(t *testing.T) {
    	tests := []struct {
    		value          string
    		expectedStatus LegalHoldStatus
    	}{
    		{
    			value:          "ON",
    			expectedStatus: LegalHoldOn,
    		},
    		{
    			value:          "Off",
    			expectedStatus: LegalHoldOff,
    		},
    		{
    			value:          "x",
    			expectedStatus: "",
    		},
    	}
    
    	for _, tt := range tests {
    		actualStatus := parseLegalHoldStatus(tt.value)
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Feb 22 06:26:06 GMT 2024
    - 17.1K bytes
    - Viewed (0)
  2. internal/lock/lock_test.go

    	if err == nil {
    		t.Fatal("Should fail here")
    	}
    }
    
    // Tests lock directory fail.
    func TestLockDirFail(t *testing.T) {
    	d := t.TempDir()
    
    	_, err := LockedOpenFile(d, os.O_APPEND, 0o600)
    	if err == nil {
    		t.Fatal("Should fail here")
    	}
    }
    
    // Tests rwlock methods.
    func TestRWLockedFile(t *testing.T) {
    	f, err := os.CreateTemp("", "lock")
    	if err != nil {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 19 18:05:16 GMT 2022
    - 3.6K bytes
    - Viewed (0)
Back to top