@nsshunt/ststestrunner 1.1.95 → 1.1.96

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.
@@ -1088,6 +1088,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
1088
1088
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1089
1089
  const retVal = await client.GetResource("Person", personRecord.id);
1090
1090
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1091
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1091
1092
  delete personRecord.meta;
1092
1093
  delete retVal.body.meta;
1093
1094
  const p1 = JSON.stringify(personRecord);
@@ -1117,6 +1118,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1117
1118
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1118
1119
  const retVal = await client.GetResource("Person", personRecord.id);
1119
1120
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1121
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1120
1122
  this.runner.instrumentData.requestCount++;
1121
1123
  const compPersonRecord = { ...personRecord };
1122
1124
  const loadedPersonRecorded = { ...retVal.body };
@@ -1141,6 +1143,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1141
1143
  originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1142
1144
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1143
1145
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1146
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1144
1147
  const updatedRecord = { ...retVal.body };
1145
1148
  delete updatedRecord.meta;
1146
1149
  delete originalPersonRecord.meta;
@@ -1177,6 +1180,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
1177
1180
  originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
1178
1181
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
1179
1182
  this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
1183
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1180
1184
  const updatedRecord = { ...retVal.body };
1181
1185
  delete updatedRecord.meta;
1182
1186
  delete originalPersonRecord.meta;
@@ -1220,9 +1224,11 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
1220
1224
  };
1221
1225
  retVal = await client.GenericSearchTesting("Person", data);
1222
1226
  this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
1227
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1223
1228
  } else {
1224
1229
  retVal = await client.GetResources(url);
1225
1230
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
1231
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1226
1232
  }
1227
1233
  return retVal.body;
1228
1234
  };
@@ -1885,12 +1891,14 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
1885
1891
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1886
1892
  const retVal = await client.GetResource("Person", personRecord.id);
1887
1893
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1894
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1888
1895
  const resource = retVal.body;
1889
1896
  const observer = fast_json_patch_default.observe(resource);
1890
1897
  resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
1891
1898
  const patchRecord = fast_json_patch_default.generate(observer);
1892
1899
  const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
1893
1900
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1901
+ if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1894
1902
  return retValPatched.body;
1895
1903
  };
1896
1904
  };
@@ -1905,10 +1913,12 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
1905
1913
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1906
1914
  const retVal = await client.GetResource("Person", personRecord.id);
1907
1915
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1916
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1908
1917
  const resource = retVal.body;
1909
1918
  resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
1910
1919
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
1911
1920
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1921
+ if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1912
1922
  return retValPatched.body;
1913
1923
  };
1914
1924
  };
@@ -1924,6 +1934,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
1924
1934
  if (personRecord.text) try {
1925
1935
  const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
1926
1936
  this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
1937
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1927
1938
  return retVal.body;
1928
1939
  } catch (error) {
1929
1940
  if (axios.isAxiosError(error)) {
@@ -1951,6 +1962,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
1951
1962
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1952
1963
  const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
1953
1964
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
1965
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1954
1966
  return retVal.body;
1955
1967
  };
1956
1968
  };