Skip to content

Commit 0b5a099

Browse files
committed
🐛 fix case 2 by adding data to the new object
1 parent 7d81e93 commit 0b5a099

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

lib/routes/routeBackbeat.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,11 @@ function putMetadata(request, response, bucketInfo, objMd, log, callback) {
616616
// To prevent this, the versionId field is only included in options when it is defined.
617617
if (versionId !== undefined) {
618618
options.versionId = versionId;
619+
omVal.versionId = versionId;
620+
621+
if (isNull) {
622+
omVal.isNull = isNull;
623+
}
619624

620625
// In the MongoDB metadata backend, setting the versionId option leads to the creation
621626
// or update of the version object, the master object is only updated if its versionId

tests/multipleBackend/routes/routeBackbeatForReplication.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ const scenarios = [
7676
{ name: 'same account', src, dst: src },
7777
{ name: 'cross account', src, dst },
7878
];
79-
const itSkipIfNotS3C = process.env.S3_END_TO_END ? it : it.skip;
8079

8180
scenarios.forEach(({ name, src, dst }) => {
8281
describe(`backbeat routes for replication (${name})`, () => {
@@ -1018,7 +1017,7 @@ describe(`backbeat routes for replication (${name})`, () => {
10181017
});
10191018
});
10201019

1021-
itSkipIfNotS3C('should replicate/put metadata to a destination that has a suspended null version', done => {
1020+
it('should replicate/put metadata to a destination that has a suspended null version', done => {
10221021
let objMD;
10231022
let versionId;
10241023

@@ -1194,7 +1193,7 @@ describe(`backbeat routes for replication (${name})`, () => {
11941193
});
11951194
});
11961195

1197-
itSkipIfNotS3C(
1196+
it(
11981197
'should replicate/put metadata to a destination that has a suspended null version with internal version',
11991198
done => {
12001199
const tagSet = [

0 commit comments

Comments
 (0)