@nsshunt/ststestrunner 1.1.165 → 1.1.167
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.
package/dist/ststestrunner.cjs
CHANGED
|
@@ -2335,29 +2335,36 @@ var TestCaseFhir08 = class extends TestCaseFhirQueryBase {
|
|
|
2335
2335
|
const __snapshot4 = this._CheckOutputLongDurationError(__snapshot3, "await this.GetResource()");
|
|
2336
2336
|
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2337
2337
|
const resource = retVal.body;
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
2341
|
-
|
|
2342
|
-
|
|
2343
|
-
|
|
2344
|
-
|
|
2345
|
-
|
|
2346
|
-
|
|
2347
|
-
|
|
2348
|
-
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
if (axiosError.response
|
|
2358
|
-
|
|
2338
|
+
if (resource.meta) {
|
|
2339
|
+
const loadedRecordVersion = parseInt(resource.meta.versionId);
|
|
2340
|
+
try {
|
|
2341
|
+
const retVal = await client.DeleteResource("Person", personRecord.id, `W/"${loadedRecordVersion}"`);
|
|
2342
|
+
this._CheckOutputLongDurationError(__snapshot4, "await this.DeleteResource()");
|
|
2343
|
+
if (retVal.status === StatusCodes.UNAUTHORIZED) throw new Error("UNAUTHORIZED");
|
|
2344
|
+
const deletedRetValCheck = {
|
|
2345
|
+
resourceType: "OperationOutcome",
|
|
2346
|
+
issue: [{
|
|
2347
|
+
severity: "error",
|
|
2348
|
+
code: "deleted",
|
|
2349
|
+
diagnostics: `DeleteResource: Resource ${personRecord.id} version ${loadedRecordVersion + 1} has been deleted.`
|
|
2350
|
+
}]
|
|
2351
|
+
};
|
|
2352
|
+
this.CheckReturnData(deletedRetValCheck, retVal.body);
|
|
2353
|
+
return retVal.body;
|
|
2354
|
+
} catch (error) {
|
|
2355
|
+
if (axios.default.isAxiosError(error)) {
|
|
2356
|
+
const axiosError = error;
|
|
2357
|
+
if (axiosError.response) {
|
|
2358
|
+
if (axiosError.response.status !== StatusCodes.GONE) throw error;
|
|
2359
|
+
return null;
|
|
2360
|
+
} else throw error;
|
|
2359
2361
|
} else throw error;
|
|
2360
|
-
}
|
|
2362
|
+
}
|
|
2363
|
+
} else {
|
|
2364
|
+
console.log(resource);
|
|
2365
|
+
console.log(retVal.status);
|
|
2366
|
+
await (0, _nsshunt_stsutils.Sleep)(1e3);
|
|
2367
|
+
return null;
|
|
2361
2368
|
}
|
|
2362
2369
|
};
|
|
2363
2370
|
};
|