mirror of
https://github.com/pgsty/minio.git
synced 2026-07-22 21:50:22 +03:00
handler: simplify parsing valid location constraint. (#4040)
Separate out validating v/s parsing logic in isValidLocationConstraint() into parseLocationConstraint() and isValidLocation() Additionally also set `X-Amz-Bucket-Region` as part of the common headers for the clients to fallback on in-case of any region related errors.
This commit is contained in:
@@ -1346,6 +1346,11 @@ func TestToAdminAPIErr(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestWriteSetConfigResponse(t *testing.T) {
|
||||
rootPath, err := newTestConfig(globalMinioDefaultRegion)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
defer removeAll(rootPath)
|
||||
testCases := []struct {
|
||||
status bool
|
||||
errs []error
|
||||
|
||||
Reference in New Issue
Block a user