refactor(app): inline bucket replication output (#2454)

This commit is contained in:
安正超
2026-04-10 07:07:29 +08:00
committed by GitHub
parent acdd2de21f
commit 33b50a5366
2 changed files with 3 additions and 13 deletions
+1 -1
View File
@@ -1721,7 +1721,7 @@ impl DefaultBucketUsecase {
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))]
+2 -12
View File
@@ -12,7 +12,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
use s3s::dto::{GetBucketReplicationOutput, PutBucketReplicationOutput, ReplicationConfiguration};
use s3s::dto::{GetBucketReplicationOutput, ReplicationConfiguration};
pub(crate) fn build_get_bucket_replication_output(
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)]
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;
#[test]
@@ -38,10 +34,4 @@ mod tests {
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());
}
}