@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.
@@ -1112,6 +1112,7 @@ var TestCaseFhir03 = class extends TestCaseFhirQueryBase {
1112
1112
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1113
1113
  const retVal = await client.GetResource("Person", personRecord.id);
1114
1114
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1115
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1115
1116
  delete personRecord.meta;
1116
1117
  delete retVal.body.meta;
1117
1118
  const p1 = JSON.stringify(personRecord);
@@ -1141,6 +1142,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1141
1142
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1142
1143
  const retVal = await client.GetResource("Person", personRecord.id);
1143
1144
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1145
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1144
1146
  this.runner.instrumentData.requestCount++;
1145
1147
  const compPersonRecord = { ...personRecord };
1146
1148
  const loadedPersonRecorded = { ...retVal.body };
@@ -1165,6 +1167,7 @@ var TestCaseFhir04 = class extends TestCaseFhirQueryBase {
1165
1167
  originalPersonRecord.text.div = `Put record TestCaseFhir04 ${this.runner.iteration}`;
1166
1168
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"1"`);
1167
1169
  this._CheckOutputLongDurationError(__snapshot4, "await this.PutResource()");
1170
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1168
1171
  const updatedRecord = { ...retVal.body };
1169
1172
  delete updatedRecord.meta;
1170
1173
  delete originalPersonRecord.meta;
@@ -1201,6 +1204,7 @@ var TestCaseFhir05 = class extends TestCaseFhirQueryBase {
1201
1204
  originalPersonRecord.text.div = `Put record TestCaseFhir05 ${this.runner.iteration}`;
1202
1205
  const retVal = await client.PutResource("Person", originalPersonRecord, `W/"2"`);
1203
1206
  this._CheckOutputLongDurationError(__snapshot3, "await this.PutResource()");
1207
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1204
1208
  const updatedRecord = { ...retVal.body };
1205
1209
  delete updatedRecord.meta;
1206
1210
  delete originalPersonRecord.meta;
@@ -1244,9 +1248,11 @@ var TestCaseFhir06 = class extends TestCaseFhirQueryBase {
1244
1248
  };
1245
1249
  retVal = await client.GenericSearchTesting("Person", data);
1246
1250
  this._CheckOutputLongDurationError(__snapshot3, "await this.GenericSearchTesting()");
1251
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1247
1252
  } else {
1248
1253
  retVal = await client.GetResources(url);
1249
1254
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetResources()");
1255
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1250
1256
  }
1251
1257
  return retVal.body;
1252
1258
  };
@@ -1909,12 +1915,14 @@ var TestCaseFhir07 = class extends TestCaseFhirQueryBase {
1909
1915
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1910
1916
  const retVal = await client.GetResource("Person", personRecord.id);
1911
1917
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1918
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1912
1919
  const resource = retVal.body;
1913
1920
  const observer = fast_json_patch_default.observe(resource);
1914
1921
  resource.text.div = `Json Patched record TestCaseFhir07 ${this.runner.iteration}`;
1915
1922
  const patchRecord = fast_json_patch_default.generate(observer);
1916
1923
  const retValPatched = await client.PatchResource("Person", personRecord.id, patchRecord, `application/json-patch+json`, `W/"3"`);
1917
1924
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1925
+ if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1918
1926
  return retValPatched.body;
1919
1927
  };
1920
1928
  };
@@ -1929,10 +1937,12 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
1929
1937
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1930
1938
  const retVal = await client.GetResource("Person", personRecord.id);
1931
1939
  const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
1940
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1932
1941
  const resource = retVal.body;
1933
1942
  resource.text.div = `Merge Patched record TestCaseFhir08 ${this.runner.iteration}`;
1934
1943
  const retValPatched = await client.PatchResource("Person", personRecord.id, resource, `application/merge-patch+json`, `W/"4"`);
1935
1944
  this._CheckOutputLongDurationError(__snapshot4, "await this.PatchResource()");
1945
+ if (retValPatched.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1936
1946
  return retValPatched.body;
1937
1947
  };
1938
1948
  };
@@ -1948,6 +1958,7 @@ var TestCaseFhir09 = class extends TestCaseFhirQueryBase {
1948
1958
  if (personRecord.text) try {
1949
1959
  const retVal = await client.DeleteResource("Person", personRecord.id, `W/"5"`);
1950
1960
  this._CheckOutputLongDurationError(__snapshot3, "await this.DeleteResource()");
1961
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1951
1962
  return retVal.body;
1952
1963
  } catch (error) {
1953
1964
  if (axios.default.isAxiosError(error)) {
@@ -1975,6 +1986,7 @@ var TestCaseFhir10 = class extends TestCaseFhirQueryBase {
1975
1986
  const __snapshot3 = this._CheckOutputLongDurationError(__snapshot2, "await this.GetPersonRecord()");
1976
1987
  const retVal = await client.GetHistoryInstanceFhirResource("Person", personRecord.id, "2");
1977
1988
  this._CheckOutputLongDurationError(__snapshot3, "await this.GetHistoryInstanceFhirResource()");
1989
+ if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
1978
1990
  return retVal.body;
1979
1991
  };
1980
1992
  };