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