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