@nsshunt/ststestrunner 1.1.160 → 1.1.162
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ststestrunner.cjs +36 -56
- package/dist/ststestrunner.cjs.map +1 -1
- package/dist/ststestrunner.mjs +36 -56
- package/dist/ststestrunner.mjs.map +1 -1
- package/package.json +1 -1
- package/types/libmodule/asyncRunnerFactory.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir02.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir04.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir05.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir06.d.ts +1 -1
- package/types/libmodule/testCaseFhir06.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir07.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir08.d.ts +1 -1
- package/types/libmodule/testCaseFhir08.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir09.d.ts.map +1 -1
- package/types/libmodule/testCaseFhir10.d.ts +0 -7
- package/types/libmodule/testCaseFhir10.d.ts.map +0 -1
package/dist/ststestrunner.cjs
CHANGED
|
@@ -1515,6 +1515,7 @@ var TestCaseFhir02 = class extends TestCaseFhirQueryBase {
|
|
|
1515
1515
|
this.bundleBatch.entry = [];
|
|
1516
1516
|
this.personRecords = [];
|
|
1517
1517
|
}
|
|
1518
|
+
await (0, _nsshunt_stsutils.Sleep)(500);
|
|
1518
1519
|
return personRecord;
|
|
1519
1520
|
};
|
|
1520
1521
|
};
|
|
@@ -1544,7 +1545,8 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1544
1545
|
const __snapshot1 = performance.now();
|
|
1545
1546
|
const client = await this.GetClient();
|
|
1546
1547
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1547
|
-
const
|
|
1548
|
+
const prefix = this.runner.options.personPrefix;
|
|
1549
|
+
const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "1");
|
|
1548
1550
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1549
1551
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
1550
1552
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
@@ -1552,15 +1554,14 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1552
1554
|
this.runner.instrumentData.requestCount++;
|
|
1553
1555
|
const compPersonRecord = { ...personRecord };
|
|
1554
1556
|
const loadedPersonRecorded = { ...retVal.body };
|
|
1555
|
-
|
|
1556
|
-
console.log(` ==> tag: [${loadedPersonRecorded.meta.tag}]`);
|
|
1557
|
+
const loadedRecordVersion = loadedPersonRecorded.meta.versionId;
|
|
1557
1558
|
delete compPersonRecord.meta;
|
|
1558
1559
|
delete loadedPersonRecorded.meta;
|
|
1559
1560
|
this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
|
|
1560
1561
|
const originalPersonRecord = retVal.body;
|
|
1561
1562
|
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1562
|
-
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
|
|
1563
|
-
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"
|
|
1563
|
+
originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
|
|
1564
|
+
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"${loadedRecordVersion}"`);
|
|
1564
1565
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
|
|
1565
1566
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1566
1567
|
const updatedRecord = { ...retVal.body };
|
|
@@ -1577,31 +1578,6 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
|
|
|
1577
1578
|
//#endregion
|
|
1578
1579
|
//#region src/libmodule/testCaseFhir05.ts
|
|
1579
1580
|
var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
|
|
1580
|
-
PerformExecuteQuery = async () => {
|
|
1581
|
-
const __snapshot1 = performance.now();
|
|
1582
|
-
const client = await this.GetClient();
|
|
1583
|
-
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
1584
|
-
const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "2");
|
|
1585
|
-
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
1586
|
-
if (originalPersonRecord && originalPersonRecord.text) {
|
|
1587
|
-
originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
|
|
1588
|
-
const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
|
|
1589
|
-
this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
|
|
1590
|
-
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
1591
|
-
const updatedRecord = { ...retVal.body };
|
|
1592
|
-
delete updatedRecord.meta;
|
|
1593
|
-
delete originalPersonRecord.meta;
|
|
1594
|
-
this.CheckReturnData(updatedRecord, originalPersonRecord);
|
|
1595
|
-
return retVal.body;
|
|
1596
|
-
} else {
|
|
1597
|
-
this.runner.instrumentData.errorCount++;
|
|
1598
|
-
return null;
|
|
1599
|
-
}
|
|
1600
|
-
};
|
|
1601
|
-
};
|
|
1602
|
-
//#endregion
|
|
1603
|
-
//#region src/libmodule/testCaseFhir06.ts
|
|
1604
|
-
var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
1605
1581
|
PerformExecuteQuery = async () => {
|
|
1606
1582
|
const __snapshot1 = performance.now();
|
|
1607
1583
|
const client = await this.GetClient();
|
|
@@ -2285,28 +2261,30 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
|
|
|
2285
2261
|
unescapePathComponent
|
|
2286
2262
|
});
|
|
2287
2263
|
//#endregion
|
|
2288
|
-
//#region src/libmodule/
|
|
2289
|
-
var
|
|
2264
|
+
//#region src/libmodule/testCaseFhir06.ts
|
|
2265
|
+
var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
|
|
2290
2266
|
PerformExecuteQuery = async () => {
|
|
2291
2267
|
const __snapshot1 = performance.now();
|
|
2292
2268
|
const client = await this.GetClient();
|
|
2293
2269
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
2294
|
-
const
|
|
2270
|
+
const prefix = this.runner.options.personPrefix;
|
|
2271
|
+
const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "3");
|
|
2295
2272
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
2296
2273
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
2297
2274
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2298
2275
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2299
2276
|
const resource = retVal.body;
|
|
2300
|
-
const
|
|
2277
|
+
const loadedRecordVersion = resource.meta.versionId;
|
|
2278
|
+
const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
|
|
2301
2279
|
const observer = fast_json_patch_default.observe(resource);
|
|
2302
2280
|
resource.text.div = patchText;
|
|
2303
2281
|
const patchRecord = fast_json_patch_default.generate(observer);
|
|
2304
|
-
const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"
|
|
2282
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"${loadedRecordVersion}"`);
|
|
2305
2283
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
2306
2284
|
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2307
2285
|
const retRecordCheck = { ...retValPatched.body };
|
|
2308
2286
|
personRecord.text.div = patchText;
|
|
2309
|
-
personRecord.meta.versionId =
|
|
2287
|
+
personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
|
|
2310
2288
|
delete personRecord.meta.lastUpdated;
|
|
2311
2289
|
delete retRecordCheck.meta.lastUpdated;
|
|
2312
2290
|
this.CheckReturnData(personRecord, retRecordCheck);
|
|
@@ -2314,26 +2292,28 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
|
2314
2292
|
};
|
|
2315
2293
|
};
|
|
2316
2294
|
//#endregion
|
|
2317
|
-
//#region src/libmodule/
|
|
2318
|
-
var
|
|
2295
|
+
//#region src/libmodule/testCaseFhir07.ts
|
|
2296
|
+
var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
|
|
2319
2297
|
PerformExecuteQuery = async () => {
|
|
2320
2298
|
const __snapshot1 = performance.now();
|
|
2321
2299
|
const client = await this.GetClient();
|
|
2322
2300
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
2323
|
-
const
|
|
2301
|
+
const prefix = this.runner.options.personPrefix;
|
|
2302
|
+
const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "4");
|
|
2324
2303
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
2325
2304
|
const retVal = await client.GetResource("Person", personRecord.id);
|
|
2326
2305
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2327
2306
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2328
2307
|
const resource = retVal.body;
|
|
2329
|
-
const
|
|
2308
|
+
const loadedRecordVersion = resource.meta.versionId;
|
|
2309
|
+
const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration & this.GetMaxIteration(prefix)}`;
|
|
2330
2310
|
resource.text.div = patchText;
|
|
2331
|
-
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"
|
|
2311
|
+
const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"${loadedRecordVersion}"`);
|
|
2332
2312
|
this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
|
|
2333
2313
|
if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2334
2314
|
const retRecordCheck = { ...retValPatched.body };
|
|
2335
2315
|
personRecord.text.div = patchText;
|
|
2336
|
-
personRecord.meta.versionId =
|
|
2316
|
+
personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
|
|
2337
2317
|
delete personRecord.meta.lastUpdated;
|
|
2338
2318
|
delete retRecordCheck.meta.lastUpdated;
|
|
2339
2319
|
this.CheckReturnData(personRecord, retRecordCheck);
|
|
@@ -2341,24 +2321,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2341
2321
|
};
|
|
2342
2322
|
};
|
|
2343
2323
|
//#endregion
|
|
2344
|
-
//#region src/libmodule/
|
|
2345
|
-
var
|
|
2324
|
+
//#region src/libmodule/testCaseFhir08.ts
|
|
2325
|
+
var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
2346
2326
|
PerformExecuteQuery = async () => {
|
|
2347
2327
|
const __snapshot1 = performance.now();
|
|
2348
2328
|
const client = await this.GetClient();
|
|
2349
2329
|
const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
|
|
2350
|
-
const
|
|
2330
|
+
const prefix = this.runner.options.personPrefix;
|
|
2331
|
+
const personRecord = await this.GetPersonRecord(prefix, this.GetRandomSequenceFromIteration(), "5");
|
|
2351
2332
|
const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2333
|
+
const retVal = await client.GetResource("Person", personRecord.id);
|
|
2334
|
+
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2335
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2336
|
+
const loadedRecordVersion = retVal.body.meta.versionId;
|
|
2337
|
+
try {
|
|
2338
|
+
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"${loadedRecordVersion}"`);
|
|
2339
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.DeleteResource()");
|
|
2355
2340
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2356
2341
|
const deletedRetValCheck = {
|
|
2357
2342
|
resourceType: "OperationOutcome",
|
|
2358
2343
|
issue: [{
|
|
2359
2344
|
severity: "error",
|
|
2360
2345
|
code: "deleted",
|
|
2361
|
-
diagnostics: `DeleteResource: Resource ${personRecord.id} version
|
|
2346
|
+
diagnostics: `DeleteResource: Resource ${personRecord.id} version ${loadedRecordVersion + 1} has been deleted.`
|
|
2362
2347
|
}]
|
|
2363
2348
|
};
|
|
2364
2349
|
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
@@ -2372,15 +2357,11 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
|
2372
2357
|
} else throw error;
|
|
2373
2358
|
} else throw error;
|
|
2374
2359
|
}
|
|
2375
|
-
else {
|
|
2376
|
-
this.runner.instrumentData.errorCount++;
|
|
2377
|
-
return null;
|
|
2378
|
-
}
|
|
2379
2360
|
};
|
|
2380
2361
|
};
|
|
2381
2362
|
//#endregion
|
|
2382
|
-
//#region src/libmodule/
|
|
2383
|
-
var
|
|
2363
|
+
//#region src/libmodule/testCaseFhir09.ts
|
|
2364
|
+
var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
|
|
2384
2365
|
PerformExecuteQuery = async () => {
|
|
2385
2366
|
const __snapshot1 = performance.now();
|
|
2386
2367
|
const client = await this.GetClient();
|
|
@@ -3267,7 +3248,6 @@ var AsyncRunnerFactory = class {
|
|
|
3267
3248
|
case "TestCaseFhir07": return new TestCaseFhir07(runnerExecutionWorker, runner);
|
|
3268
3249
|
case "TestCaseFhir08": return new TestCaseFhir08(runnerExecutionWorker, runner);
|
|
3269
3250
|
case "TestCaseFhir09": return new TestCaseFhir09(runnerExecutionWorker, runner);
|
|
3270
|
-
case "TestCaseFhir10": return new TestCaseFhir10(runnerExecutionWorker, runner);
|
|
3271
3251
|
case "TestCaseFhir20": return new TestCaseFhir20(runnerExecutionWorker, runner);
|
|
3272
3252
|
}
|
|
3273
3253
|
return null;
|