File tree 2 files changed +4
-1
lines changed
2 files changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -406,6 +406,9 @@ func (c *Config) EditRule(opts Options) error {
406
406
return fmt .Errorf ("priority must be unique. Replication configuration already has a rule with this priority" )
407
407
}
408
408
if rule .Destination .Bucket != newRule .Destination .Bucket && rule .ID == newRule .ID {
409
+ if c .Role == newRule .Destination .Bucket {
410
+ continue
411
+ }
409
412
return fmt .Errorf ("invalid destination bucket for this rule" )
410
413
}
411
414
}
Original file line number Diff line number Diff line change @@ -180,7 +180,7 @@ func TestEditReplicationRule(t *testing.T) {
180
180
StorageClass : "STANDARD" ,
181
181
DestBucket : "arn:minio:replication:eu-west-1:c5acb6ac-9918-4dc6-8534-6244ed1a611a:destbucket" ,
182
182
},
183
- expectedErr : "invalid destination bucket for this rule " ,
183
+ expectedErr : "" ,
184
184
},
185
185
{ // test case :2 mismatched rule id
186
186
cfg : Config {
You can’t perform that action at this time.
0 commit comments