@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.
@@ -1540,7 +1540,8 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1540
1540
  const __snapshot1 = performance.now();
1541
1541
  const client = await this.GetClient();
1542
1542
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1543
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "1");
1543
+ const prefix = this.runner.options.personPrefix;
1544
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "1");
1544
1545
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1545
1546
  const retVal = await client.GetResource("Person", personRecord.id);
1546
1547
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
@@ -1554,7 +1555,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1554
1555
  this.CheckReturnData(compPersonRecord, loadedPersonRecorded);
1555
1556
  const originalPersonRecord = retVal.body;
1556
1557
  if (originalPersonRecord && originalPersonRecord.text) {
1557
- originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1558
+ originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
1558
1559
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"${loadedRecordVersion}"`);
1559
1560
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1560
1561
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
@@ -1572,31 +1573,6 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1572
1573
  //#endregion
1573
1574
  //#region src/libmodule/testCaseFhir05.ts
1574
1575
  var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
1575
- PerformExecuteQuery = async () => {
1576
- const __snapshot1 = performance.now();
1577
- const client = await this.GetClient();
1578
- const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
1579
- const originalPersonRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "2");
1580
- const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1581
- if (originalPersonRecord && originalPersonRecord.text) {
1582
- originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
1583
- const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
1584
- this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
1585
- if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1586
- const updatedRecord = { ...retVal.body };
1587
- delete updatedRecord.meta;
1588
- delete originalPersonRecord.meta;
1589
- this.CheckReturnData(updatedRecord, originalPersonRecord);
1590
- return retVal.body;
1591
- } else {
1592
- this.runner.instrumentData.errorCount++;
1593
- return null;
1594
- }
1595
- };
1596
- };
1597
- //#endregion
1598
- //#region src/libmodule/testCaseFhir06.ts
1599
- var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
1600
1576
  PerformExecuteQuery = async () => {
1601
1577
  const __snapshot1 = performance.now();
1602
1578
  const client = await this.GetClient();
@@ -2280,20 +2256,21 @@ var fast_json_patch_default = Object.assign({}, core_exports, duplex_exports, {
2280
2256
  unescapePathComponent
2281
2257
  });
2282
2258
  //#endregion
2283
- //#region src/libmodule/testCaseFhir07.ts
2284
- var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2259
+ //#region src/libmodule/testCaseFhir06.ts
2260
+ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
2285
2261
  PerformExecuteQuery = async () => {
2286
2262
  const __snapshot1 = performance.now();
2287
2263
  const client = await this.GetClient();
2288
2264
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2289
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "3");
2265
+ const prefix = this.runner.options.personPrefix;
2266
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "3");
2290
2267
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2291
2268
  const retVal = await client.GetResource("Person", personRecord.id);
2292
2269
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2293
2270
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2294
2271
  const resource = retVal.body;
2295
2272
  const loadedRecordVersion = resource.meta.versionId;
2296
- const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
2273
+ const patchText = `Json Patched record TestCaseFhir07 ${this.runner.iteration % this.GetMaxIteration(prefix)}`;
2297
2274
  const observer = fast_json_patch_default.observe(resource);
2298
2275
  resource.text.div = patchText;
2299
2276
  const patchRecord = fast_json_patch_default.generate(observer);
@@ -2302,7 +2279,7 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2302
2279
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2303
2280
  const retRecordCheck = { ...retValPatched.body };
2304
2281
  personRecord.text.div = patchText;
2305
- personRecord.meta.versionId = "4";
2282
+ personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
2306
2283
  delete personRecord.meta.lastUpdated;
2307
2284
  delete retRecordCheck.meta.lastUpdated;
2308
2285
  this.CheckReturnData(personRecord, retRecordCheck);
@@ -2310,27 +2287,28 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2310
2287
  };
2311
2288
  };
2312
2289
  //#endregion
2313
- //#region src/libmodule/testCaseFhir08.ts
2314
- var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2290
+ //#region src/libmodule/testCaseFhir07.ts
2291
+ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
2315
2292
  PerformExecuteQuery = async () => {
2316
2293
  const __snapshot1 = performance.now();
2317
2294
  const client = await this.GetClient();
2318
2295
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2319
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "4");
2296
+ const prefix = this.runner.options.personPrefix;
2297
+ const personRecord = await this.GetPersonRecord(`${prefix}`, this.GetRandomSequenceFromIteration(), "4");
2320
2298
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2321
2299
  const retVal = await client.GetResource("Person", personRecord.id);
2322
2300
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2323
2301
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2324
2302
  const resource = retVal.body;
2325
2303
  const loadedRecordVersion = resource.meta.versionId;
2326
- const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
2304
+ const patchText = `Merge Patched record TestCaseFhir08 ${this.runner.iteration & this.GetMaxIteration(prefix)}`;
2327
2305
  resource.text.div = patchText;
2328
2306
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"${loadedRecordVersion}"`);
2329
2307
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
2330
2308
  if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2331
2309
  const retRecordCheck = { ...retValPatched.body };
2332
2310
  personRecord.text.div = patchText;
2333
- personRecord.meta.versionId = "5";
2311
+ personRecord.meta.versionId = (loadedRecordVersion + 1).toString();
2334
2312
  delete personRecord.meta.lastUpdated;
2335
2313
  delete retRecordCheck.meta.lastUpdated;
2336
2314
  this.CheckReturnData(personRecord, retRecordCheck);
@@ -2338,24 +2316,29 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2338
2316
  };
2339
2317
  };
2340
2318
  //#endregion
2341
- //#region src/libmodule/testCaseFhir09.ts
2342
- var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2319
+ //#region src/libmodule/testCaseFhir08.ts
2320
+ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
2343
2321
  PerformExecuteQuery = async () => {
2344
2322
  const __snapshot1 = performance.now();
2345
2323
  const client = await this.GetClient();
2346
2324
  const __snapshot2 = this._CheckOutputLongDurationError(__snapshot1, "await this.GetClient()");
2347
- const personRecord = await this.GetPersonRecord(`${this.runner.options.personPrefix}`, this.GetRandomSequenceFromIteration(), "5");
2325
+ const prefix = this.runner.options.personPrefix;
2326
+ const personRecord = await this.GetPersonRecord(prefix, this.GetRandomSequenceFromIteration(), "5");
2348
2327
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
2349
- if (personRecord.text) try {
2350
- const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
2351
- this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
2328
+ const retVal = await client.GetResource("Person", personRecord.id);
2329
+ const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
2330
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2331
+ const loadedRecordVersion = retVal.body.meta.versionId;
2332
+ try {
2333
+ const retVal = await client.DeleteResource("Person", personRecord.id, `W/"${loadedRecordVersion}"`);
2334
+ this._CheckOutputLongDurationError(__snapshot4, "await this.DeleteResource()");
2352
2335
  if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
2353
2336
  const deletedRetValCheck = {
2354
2337
  resourceType: "OperationOutcome",
2355
2338
  issue: [{
2356
2339
  severity: "error",
2357
2340
  code: "deleted",
2358
- diagnostics: `DeleteResource: Resource ${personRecord.id} version 6 has been deleted.`
2341
+ diagnostics: `DeleteResource: Resource ${personRecord.id} version ${loadedRecordVersion + 1} has been deleted.`
2359
2342
  }]
2360
2343
  };
2361
2344
  this.CheckReturnData(deletedRetValCheck, retVal.body);
@@ -2369,15 +2352,11 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2369
2352
  } else throw error;
2370
2353
  } else throw error;
2371
2354
  }
2372
- else {
2373
- this.runner.instrumentData.errorCount++;
2374
- return null;
2375
- }
2376
2355
  };
2377
2356
  };
2378
2357
  //#endregion
2379
- //#region src/libmodule/testCaseFhir10.ts
2380
- var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
2358
+ //#region src/libmodule/testCaseFhir09.ts
2359
+ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
2381
2360
  PerformExecuteQuery = async () => {
2382
2361
  const __snapshot1 = performance.now();
2383
2362
  const client = await this.GetClient();
@@ -3264,7 +3243,6 @@ var AsyncRunnerFactory = class {
3264
3243
  case "TestCaseFhir07": return new TestCaseFhir07(runnerExecutionWorker, runner);
3265
3244
  case "TestCaseFhir08": return new TestCaseFhir08(runnerExecutionWorker, runner);
3266
3245
  case "TestCaseFhir09": return new TestCaseFhir09(runnerExecutionWorker, runner);
3267
- case "TestCaseFhir10": return new TestCaseFhir10(runnerExecutionWorker, runner);
3268
3246
  case "TestCaseFhir20": return new TestCaseFhir20(runnerExecutionWorker, runner);
3269
3247
  }
3270
3248
  return null;