Skip to content

Commit 2cd152a

Browse files
committed
fix: add jobParams.username to v3 output as per migration
1 parent 8c008ab commit 2cd152a

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

src/jobs/types/jobs-filter-content.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,5 +94,6 @@ export const jobV3toV4FieldMap: Record<string, string> = {
9494
creationTime: "createdAt",
9595
jobStatusMessage: "statusCode",
9696
executionTime: "jobParams.executionTime",
97+
"jobParams.username": "ownerUser",
9798
datasetList: "jobParams.datasetList",
9899
};

test/JobsV3.js

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,9 @@ describe("1191: Jobs: Test Backwards Compatibility", () => {
229229
res.body.should.have
230230
.property("datasetList")
231231
.that.deep.equals(jobCreateDtoByAdmin.datasetList);
232-
res.body.should.have.property("jobParams").that.deep.equals({});
232+
res.body.should.have.property("jobParams").that.deep.equals(
233+
{username: TestData.Accounts["admin"]["username"]}
234+
);
233235
res.body.should.have
234236
.property("emailJobInitiator")
235237
.to.be.equal(TestData.Accounts["admin"]["email"]);
@@ -318,7 +320,9 @@ describe("1191: Jobs: Test Backwards Compatibility", () => {
318320
res.body.should.have
319321
.property("datasetList")
320322
.that.deep.equals(jobCreateDtoForUser51.datasetList);
321-
res.body.should.have.property("jobParams").that.deep.equals({});
323+
res.body.should.have.property("jobParams").that.deep.equals(
324+
{username: TestData.Accounts["admin"]["username"]}
325+
);
322326
encodedJobOwnedByGroup5 = encodeURIComponent(res.body["id"]);
323327
});
324328
});
@@ -362,7 +366,9 @@ describe("1191: Jobs: Test Backwards Compatibility", () => {
362366
res.body.should.have
363367
.property("datasetList")
364368
.that.deep.equals(jobCreateDtoForUser51.datasetList);
365-
res.body.should.have.property("jobParams").that.deep.equals({});
369+
res.body.should.have.property("jobParams").that.deep.equals(
370+
{username: TestData.Accounts["admin"]["username"]}
371+
);
366372
encodedJobOwnedByGroup5 = encodeURIComponent(res.body["id"]);
367373
});
368374
});
@@ -1174,6 +1180,7 @@ describe("1191: Jobs: Test Backwards Compatibility", () => {
11741180
...jobDatasetAccess,
11751181
jobParams: {
11761182
param: "ok",
1183+
username: TestData.Accounts["user5.1"]["username"]
11771184
},
11781185
datasetList: [{ pid: datasetPid1, files: [] }],
11791186
};
@@ -1254,7 +1261,9 @@ describe("1191: Jobs: Test Backwards Compatibility", () => {
12541261
res.body.should.have
12551262
.property("datasetList")
12561263
.that.deep.equals(jobCreateDtoByAdmin.datasetList);
1257-
res.body.should.have.property("jobParams").that.deep.equals({});
1264+
res.body.should.have.property("jobParams").that.deep.equals(
1265+
{username: TestData.Accounts["adminIngestor"]["username"]}
1266+
);
12581267
res.body.should.have
12591268
.property("emailJobInitiator")
12601269
.to.be.equal(TestData.Accounts["adminIngestor"]["email"]);

0 commit comments

Comments
 (0)