From 0b101e3afa1b931fa998a366127c5f7ca6132438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=87=91=E6=B5=B7=E6=B4=8B?= Date: Fri, 27 Oct 2023 17:17:32 +0800 Subject: [PATCH] add integration-test --- .../src/test/resources/reponse-check.js | 7 +++++ .../src/test/resources/rest-client.env.json | 14 +++++++++ .../src/test/resources/role-user.http | 29 +++++++++++++++++++ 3 files changed, 50 insertions(+) create mode 100644 integration-test/src/test/resources/reponse-check.js create mode 100644 integration-test/src/test/resources/rest-client.env.json create mode 100644 integration-test/src/test/resources/role-user.http diff --git a/integration-test/src/test/resources/reponse-check.js b/integration-test/src/test/resources/reponse-check.js new file mode 100644 index 0000000..e2d7b74 --- /dev/null +++ b/integration-test/src/test/resources/reponse-check.js @@ -0,0 +1,7 @@ +client.test("request executed successful", function () { + client.assert(response.status == 200, "Response status is not 200") +}); + +client.test("response body status successful", function () { + client.assert(response.body.code == 0, "Response body code is not 0") +}); diff --git a/integration-test/src/test/resources/rest-client.env.json b/integration-test/src/test/resources/rest-client.env.json new file mode 100644 index 0000000..91ef0ff --- /dev/null +++ b/integration-test/src/test/resources/rest-client.env.json @@ -0,0 +1,14 @@ +{ + "local": { + "host": "http://localhost:8080" + }, + "dev": { + "host": "https://dev-app.axzo.cn/" + }, + "test": { + "host": "https://test-api.axzo.cn/" + }, + "pre": { + "host": "https://pre-api.axzo.cn/" + } +} \ No newline at end of file diff --git a/integration-test/src/test/resources/role-user.http b/integration-test/src/test/resources/role-user.http new file mode 100644 index 0000000..af76b4e --- /dev/null +++ b/integration-test/src/test/resources/role-user.http @@ -0,0 +1,29 @@ +### +POST {{host}}/api/saas-role-user/list +Accept: application/json +Content-Type: application/json + +{ + "identityIds": [809,631] +} + +> reponse-check.js + +### +POST {{host}}/api/saas-role-user/delete +Accept: application/json +Content-Type: application/json + +{ + +} + +> reponse-check.js + + + + + + + +