mirror of
https://github.com/rustfs/rustfs.git
synced 2026-08-30 16:59:52 +00:00
refactor(app): inline bucket replication output (#2454)
This commit is contained in:
@@ -1721,7 +1721,7 @@ impl DefaultBucketUsecase {
|
|||||||
warn!(bucket = %bucket, error = ?err, "site replication bucket replication-config hook failed");
|
warn!(bucket = %bucket, error = ?err, "site replication bucket replication-config hook failed");
|
||||||
}
|
}
|
||||||
|
|
||||||
Ok(S3Response::new(replication::build_put_bucket_replication_output()))
|
Ok(S3Response::new(PutBucketReplicationOutput::default()))
|
||||||
}
|
}
|
||||||
|
|
||||||
#[instrument(level = "debug", skip(self))]
|
#[instrument(level = "debug", skip(self))]
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
use s3s::dto::{GetBucketReplicationOutput, PutBucketReplicationOutput, ReplicationConfiguration};
|
use s3s::dto::{GetBucketReplicationOutput, ReplicationConfiguration};
|
||||||
|
|
||||||
pub(crate) fn build_get_bucket_replication_output(
|
pub(crate) fn build_get_bucket_replication_output(
|
||||||
replication_configuration: ReplicationConfiguration,
|
replication_configuration: ReplicationConfiguration,
|
||||||
@@ -22,13 +22,9 @@ pub(crate) fn build_get_bucket_replication_output(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) fn build_put_bucket_replication_output() -> PutBucketReplicationOutput {
|
|
||||||
PutBucketReplicationOutput::default()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use super::{build_get_bucket_replication_output, build_put_bucket_replication_output};
|
use super::build_get_bucket_replication_output;
|
||||||
use s3s::dto::ReplicationConfiguration;
|
use s3s::dto::ReplicationConfiguration;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
@@ -38,10 +34,4 @@ mod tests {
|
|||||||
|
|
||||||
assert_eq!(output.replication_configuration, Some(config));
|
assert_eq!(output.replication_configuration, Some(config));
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
|
||||||
fn test_build_put_bucket_replication_output_is_default() {
|
|
||||||
let output = build_put_bucket_replication_output();
|
|
||||||
assert_eq!(output, Default::default());
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user