@nsshunt/ststestrunner 1.1.161 → 1.1.163

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.
@@ -1545,7 +1545,8 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1545
1545
  const __snapshot1 = performance.now();
1546
1546
  const client = await this.GetClient();
1547
1547
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1548
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "1");
1548
+ const prefix = this.runner.options.personPrefix;
1549
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "1");
1549
1550
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1550
1551
  const retVal = await client.GetResource("Person", personRecord.id);
1551
1552
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
@@ -1556,10 +1557,11 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1556
1557
  const loadedRecordVersion = loadedPersonRecorded.meta.versionId;
1557
1558
  delete compPersonRecord.meta;
1558
1559
  delete loadedPersonRecorded.meta;
1560
+ if (loadedRecordVersion > 1) compPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
1559
1561
  this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
1560
1562
  const originalPersonRecord = retVal.body;
1561
1563
  if (originalPersonRecord && originalPersonRecord.text) {
1562
- originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1564
+ originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
1563
1565
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"${loadedRecordVersion}"`);
1564
1566
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1565
1567
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
@@ -1577,31 +1579,6 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1577
1579
  //#endregion
1578
1580
  //#region src/libmodule/testCaseFhir05.ts
1579
1581
  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
1582
  PerformExecuteQuery = async () => {
1606
1583
  const __snapshot1 = performance.now();
1607
1584
  const client = await this.GetClient();
@@ -2285,20 +2262,21 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
2285
2262
  unescapePathComponent
2286
2263
  });
2287
2264
  //#endregion
2288
- //#region src/libmodule/testCaseFhir07.ts
2289
- var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2265
+ //#region src/libmodule/testCaseFhir06.ts
2266
+ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
2290
2267
  PerformExecuteQuery = async () => {
2291
2268
  const __snapshot1 = performance.now();
2292
2269
  const client = await this.GetClient();
2293
2270
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2294
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "3");
2271
+ const prefix = this.runner.options.personPrefix;
2272
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "3");
2295
2273
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2296
2274
  const retVal = await client.GetResource("Person", personRecord.id);
2297
2275
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2298
2276
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2299
2277
  const resource = retVal.body;
2300
2278
  const loadedRecordVersion = resource.meta.versionId;
2301
- const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2279
+ const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
2302
2280
  const observer = fast_json_patch_default.observe(resource);
2303
2281
  resource.text.div = patchText;
2304
2282
  const patchRecord = fast_json_patch_default.generate(observer);
@@ -2307,7 +2285,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2307
2285
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2308
2286
  const retRecordCheck = { ...retValPatched.body };
2309
2287
  personRecord.text.div = patchText;
2310
- personRecord.meta.versionId = "4";
2288
+ personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
2311
2289
  delete personRecord.meta.lastUpdated;
2312
2290
  delete retRecordCheck.meta.lastUpdated;
2313
2291
  this.CheckReturnData(personRecord, retRecordCheck);
@@ -2315,27 +2293,28 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2315
2293
  };
2316
2294
  };
2317
2295
  //#endregion
2318
- //#region src/libmodule/testCaseFhir08.ts
2319
- var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2296
+ //#region src/libmodule/testCaseFhir07.ts
2297
+ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2320
2298
  PerformExecuteQuery = async () => {
2321
2299
  const __snapshot1 = performance.now();
2322
2300
  const client = await this.GetClient();
2323
2301
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2324
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "4");
2302
+ const prefix = this.runner.options.personPrefix;
2303
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "4");
2325
2304
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2326
2305
  const retVal = await client.GetResource("Person", personRecord.id);
2327
2306
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2328
2307
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2329
2308
  const resource = retVal.body;
2330
2309
  const loadedRecordVersion = resource.meta.versionId;
2331
- const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2310
+ const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration & this.GetMaxIteration(prefix)}`;
2332
2311
  resource.text.div = patchText;
2333
2312
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"${loadedRecordVersion}"`);
2334
2313
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2335
2314
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2336
2315
  const retRecordCheck = { ...retValPatched.body };
2337
2316
  personRecord.text.div = patchText;
2338
- personRecord.meta.versionId = "5";
2317
+ personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
2339
2318
  delete personRecord.meta.lastUpdated;
2340
2319
  delete retRecordCheck.meta.lastUpdated;
2341
2320
  this.CheckReturnData(personRecord, retRecordCheck);
@@ -2343,24 +2322,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2343
2322
  };
2344
2323
  };
2345
2324
  //#endregion
2346
- //#region src/libmodule/testCaseFhir09.ts
2347
- var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2325
+ //#region src/libmodule/testCaseFhir08.ts
2326
+ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2348
2327
  PerformExecuteQuery = async () => {
2349
2328
  const __snapshot1 = performance.now();
2350
2329
  const client = await this.GetClient();
2351
2330
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2352
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "5");
2331
+ const prefix = this.runner.options.personPrefix;
2332
+ const personRecord = await this.GetPersonRecord(prefix, this.GetRandomSequenceFromIteration(), "5");
2353
2333
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2354
- if (personRecord.text) try {
2355
- const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
2356
- this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
2334
+ const retVal = await client.GetResource("Person", personRecord.id);
2335
+ const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2336
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2337
+ const loadedRecordVersion = retVal.body.meta.versionId;
2338
+ try {
2339
+ const retVal = await client.DeleteResource("Person", personRecord.id, `W/"${loadedRecordVersion}"`);
2340
+ this._CheckOutputLongDurationError(__snapshot4, "await this.DeleteResource()");
2357
2341
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2358
2342
  const deletedRetValCheck = {
2359
2343
  resourceType: "OperationOutcome",
2360
2344
  issue: [{
2361
2345
  severity: "error",
2362
2346
  code: "deleted",
2363
- diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
2347
+ diagnostics: `DeleteResource: Resource ${personRecord.id} version ${loadedRecordVersion + 1} has been deleted.`
2364
2348
  }]
2365
2349
  };
2366
2350
  this.CheckReturnData(deletedRetValCheck, retVal.body);
@@ -2374,15 +2358,11 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2374
2358
  } else throw error;
2375
2359
  } else throw error;
2376
2360
  }
2377
- else {
2378
- this.runner.instrumentData.errorCount++;
2379
- return null;
2380
- }
2381
2361
  };
2382
2362
  };
2383
2363
  //#endregion
2384
- //#region src/libmodule/testCaseFhir10.ts
2385
- var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
2364
+ //#region src/libmodule/testCaseFhir09.ts
2365
+ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2386
2366
  PerformExecuteQuery = async () => {
2387
2367
  const __snapshot1 = performance.now();
2388
2368
  const client = await this.GetClient();
@@ -3269,7 +3249,6 @@ var AsyncRunnerFactory = class {
3269
3249
  case "TestCaseFhir07": return new TestCaseFhir07(runnerExecutionWorker, runner);
3270
3250
  case "TestCaseFhir08": return new TestCaseFhir08(runnerExecutionWorker, runner);
3271
3251
  case "TestCaseFhir09": return new TestCaseFhir09(runnerExecutionWorker, runner);
3272
- case "TestCaseFhir10": return new TestCaseFhir10(runnerExecutionWorker, runner);
3273
3252
  case "TestCaseFhir20": return new TestCaseFhir20(runnerExecutionWorker, runner);
3274
3253
  }
3275
3254
  return null;