Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 99 for testSave (0.15 sec)

  1. cmd/signature-v4_test.go

    				"Policy": []string{"policy"},
    			},
    			expected: ErrNone,
    		},
    	}
    
    	// Run each test case individually.
    	for i, testCase := range testCases {
    		_, code := doesPolicySignatureMatch(testCase.form)
    		if code != testCase.expected {
    			t.Errorf("(%d) expected to get %s, instead got %s", i, niceError(testCase.expected), niceError(code))
    		}
    	}
    }
    
    func TestDoesPresignedSignatureMatch(t *testing.T) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Thu Jan 18 07:03:17 GMT 2024
    - 10.4K bytes
    - Viewed (1)
  2. cmd/api-errors_test.go

    }
    
    func TestAPIErrCode(t *testing.T) {
    	ctx := context.Background()
    	for i, testCase := range toAPIErrorTests {
    		errCode := toAPIErrorCode(ctx, testCase.err)
    		if errCode != testCase.errCode {
    			t.Errorf("Test %d: Expected error code %d, got %d", i+1, testCase.errCode, errCode)
    		}
    	}
    }
    
    // Check if an API error is properly defined
    func TestAPIErrCodeDefinition(t *testing.T) {
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Sep 25 15:13:08 GMT 2023
    - 3.4K bytes
    - Viewed (0)
  3. istioctl/pkg/workload/workload_test.go

      template:
        ports:
          grpc: 3550
          http: 8080
        serviceAccount: test
    `
    )
    
    type testcase struct {
    	description       string
    	expectedException bool
    	args              []string
    	expectedOutput    string
    	namespace         string
    }
    
    func TestWorkloadGroupCreate(t *testing.T) {
    	cases := []testcase{
    		{
    			description:       "Invalid command args - missing service name and namespace",
    Go
    - Registered: Wed May 08 22:53:08 GMT 2024
    - Last Modified: Wed Mar 27 16:59:05 GMT 2024
    - 14.6K bytes
    - Viewed (0)
  4. cmd/erasure-healing-common_test.go

    	// common modtime. Tests fail if modtime does not match.
    	for i, testCase := range testCases {
    		// Obtain a common mod time from modTimes slice.
    		ctime := commonTime(testCase.times, testCase.quorum)
    		if !testCase.time.Equal(ctime) {
    			t.Errorf("Test case %d, expect to pass but failed. Wanted modTime: %s, got modTime: %s\n", i+1, testCase.time, ctime)
    		}
    	}
    }
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Tue Jan 30 20:43:25 GMT 2024
    - 23K bytes
    - Viewed (1)
  5. cmd/format-erasure_test.go

    				}{
    					Version: "0",
    				},
    			},
    			false,
    		},
    	}
    
    	// Valid all test cases.
    	for i, testCase := range testCases {
    		if err := checkFormatErasureValue(testCase.format, nil); err != nil && testCase.success {
    			t.Errorf("Test %d: Expected failure %s", i+1, err)
    		}
    	}
    }
    
    // Tests getFormatErasureInQuorum()
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Mon Apr 15 08:25:46 GMT 2024
    - 12.9K bytes
    - Viewed (0)
  6. cmd/test-utils_test.go

    //
    //	STEP 1: Call the handler with the unsigned HTTP request (anonReq), assert for the `ErrAccessDenied` error response.
    func ExecObjectLayerAPIAnonTest(t *testing.T, obj ObjectLayer, testName, bucketName, objectName, instanceType string, apiRouter http.Handler,
    	anonReq *http.Request, bucketPolicy *policy.BucketPolicy,
    ) {
    	anonTestStr := "Anonymous HTTP request test"
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri May 03 17:26:51 GMT 2024
    - 76.2K bytes
    - Viewed (0)
  7. tests/update_test.go

    		t.Errorf("failed to save company, got err: %v", err)
    	}
    	if err := DB.Save(&company).Error; err != nil || company.ID != create.ID {
    		t.Errorf("failed to save company, got err: %v", err)
    	}
    }
    
    func TestSave(t *testing.T) {
    	user := *GetUser("save", Config{})
    	DB.Create(&user)
    
    	if err := DB.First(&User{}, "name = ?", "save").Error; err != nil {
    		t.Fatalf("failed to find created user")
    	}
    
    Go
    - Registered: Sun May 05 09:35:13 GMT 2024
    - Last Modified: Mon Dec 04 03:50:58 GMT 2023
    - 30.3K bytes
    - Viewed (0)
  8. internal/event/name_test.go

    	}
    
    	for i, testCase := range testCases {
    		data, err := json.Marshal(testCase.name)
    		expectErr := (err != nil)
    
    		if expectErr != testCase.expectErr {
    			t.Fatalf("test %v: error: expected: %v, got: %v", i+1, testCase.expectErr, expectErr)
    		}
    
    		if !testCase.expectErr {
    			if !reflect.DeepEqual(data, testCase.expectedData) {
    				t.Fatalf("test %v: data: expected: %v, got: %v", i+1, string(testCase.expectedData), string(data))
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 01:11:10 GMT 2024
    - 7.4K bytes
    - Viewed (0)
  9. internal/auth/credentials_test.go

    		{1574812326.000, false},
    		{time.Duration(3) * time.Minute, false},
    	}
    
    	for _, testCase := range testCases {
    		testCase := testCase
    		t.Run("", func(t *testing.T) {
    			_, err := ExpToInt64(testCase.exp)
    			if err != nil && !testCase.expectedFailure {
    				t.Errorf("Expected success but got failure %s", err)
    			}
    			if err == nil && testCase.expectedFailure {
    				t.Error("Expected failure but got success")
    			}
    		})
    	}
    }
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Fri Mar 01 21:09:42 GMT 2024
    - 5.4K bytes
    - Viewed (0)
  10. cmd/object-api-listobjects_test.go

    				resultV, err = obj.ListObjectVersions(context.Background(), testCase.bucketName,
    					testCase.prefix, testCase.marker, "", testCase.delimiter, testCase.maxKeys)
    			} else {
    				t.Log("ListObjects, bucket:", testCase.bucketName, "prefix:",
    					testCase.prefix, "marker:", testCase.marker, "delimiter:",
    					testCase.delimiter, "maxkeys:", testCase.maxKeys)
    
    Go
    - Registered: Sun May 05 19:28:20 GMT 2024
    - Last Modified: Wed May 01 11:07:40 GMT 2024
    - 73.1K bytes
    - Viewed (0)
Back to top