From 8c2aa27a4a6f9b33e574d1ffcca85d25054778ee Mon Sep 17 00:00:00 2001 From: Alexander Date: Thu, 6 Aug 2026 21:04:26 +0300 Subject: [PATCH] test Bruno directory commit --- Services_API/Create Release.yml | 33 ++++++++++++ Services_API/Create Service Without Body.yml | 48 ++++++++++++++++++ Services_API/Create Service Without Code.yml | 52 +++++++++++++++++++ Services_API/Create Service.yml | 53 ++++++++++++++++++++ Services_API/Get All Services.yml | 15 ++++++ Services_API/Get Service by Code.yml | 15 ++++++ Services_API/Get Service by ID.yml | 15 ++++++ Services_API/Negative - Invalid UUID.yml | 15 ++++++ Services_API/Negative - Missing Body.yml | 21 ++++++++ Services_API/Update Release.yml | 26 ++++++++++ Services_API/Update Service.yml | 26 ++++++++++ Services_API/opencollection.yml | 23 +++++++++ 12 files changed, 342 insertions(+) create mode 100644 Services_API/Create Release.yml create mode 100644 Services_API/Create Service Without Body.yml create mode 100644 Services_API/Create Service Without Code.yml create mode 100644 Services_API/Create Service.yml create mode 100644 Services_API/Get All Services.yml create mode 100644 Services_API/Get Service by Code.yml create mode 100644 Services_API/Get Service by ID.yml create mode 100644 Services_API/Negative - Invalid UUID.yml create mode 100644 Services_API/Negative - Missing Body.yml create mode 100644 Services_API/Update Release.yml create mode 100644 Services_API/Update Service.yml create mode 100644 Services_API/opencollection.yml diff --git a/Services_API/Create Release.yml b/Services_API/Create Release.yml new file mode 100644 index 0000000..3ba7bbe --- /dev/null +++ b/Services_API/Create Release.yml @@ -0,0 +1,33 @@ +info: + name: Create Release + type: http + seq: 8 + +http: + method: POST + url: "{{baseUrl}}/api/v1/releases" + headers: + - name: Content-Type + value: application/json + body: + type: json + data: |- + { + "service": "e58ac01a-606b-4cf7-9dee-cb4484672fa1", + "version": "1.0.0", + "changelog": "Initial release" + } + auth: inherit + +runtime: + scripts: + - type: after-response + code: "let json = res.getBody();\r + + bru.setEnvVar('releaseId', json.data.id);" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Create Service Without Body.yml b/Services_API/Create Service Without Body.yml new file mode 100644 index 0000000..8c94c05 --- /dev/null +++ b/Services_API/Create Service Without Body.yml @@ -0,0 +1,48 @@ +info: + name: Create Service Without Body + type: http + seq: 3 + +http: + method: POST + url: "{{baseUrl}}/api/v1/services" + headers: + - name: Content-Type + value: application/json + - name: requestID + value: test-req-1 + body: + type: json + data: "" + auth: inherit + +runtime: + scripts: + - type: after-response + code: "test('Status code is 200', function () {\r + + \ expect(res.getStatus()).to.equal(200);\r + + });\r + + \r + + let json = res.getBody();\r + + \r + + test('Status is SUCCESS', function () {\r + + \ expect(json.status).to.eql('SUCCESS');\r + + });\r + + \r + + bru.setEnvVar('serviceId', json.data.id);" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Create Service Without Code.yml b/Services_API/Create Service Without Code.yml new file mode 100644 index 0000000..10c3327 --- /dev/null +++ b/Services_API/Create Service Without Code.yml @@ -0,0 +1,52 @@ +info: + name: Create Service Without Code + type: http + seq: 2 + +http: + method: POST + url: "{{baseUrl}}/api/v1/services" + headers: + - name: Content-Type + value: application/json + - name: requestID + value: test-req-1 + body: + type: json + data: |- + { + "type": "SYSTEM", + "name": "Сервис управления версиями модулей" + } + auth: inherit + +runtime: + scripts: + - type: after-response + code: "test('Status code is 200', function () {\r + + \ expect(res.getStatus()).to.equal(200);\r + + });\r + + \r + + let json = res.getBody();\r + + \r + + test('Status is SUCCESS', function () {\r + + \ expect(json.status).to.eql('SUCCESS');\r + + });\r + + \r + + bru.setEnvVar('serviceId', json.data.id);" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Create Service.yml b/Services_API/Create Service.yml new file mode 100644 index 0000000..8e129a8 --- /dev/null +++ b/Services_API/Create Service.yml @@ -0,0 +1,53 @@ +info: + name: Create Service + type: http + seq: 1 + +http: + method: POST + url: "{{baseUrl}}/api/v1/services" + headers: + - name: Content-Type + value: application/json + - name: requestID + value: test-req-1 + body: + type: json + data: |- + { + "type": "SYSTEM", + "code": "SERVICE_1", + "name": "Test Service" + } + auth: inherit + +runtime: + scripts: + - type: after-response + code: "test('Status code is 200', function () {\r + + \ expect(res.getStatus()).to.equal(200);\r + + });\r + + \r + + let json = res.getBody();\r + + \r + + test('Status is SUCCESS', function () {\r + + \ expect(json.status).to.eql('SUCCESS');\r + + });\r + + \r + + bru.setEnvVar('serviceId', json.data.id);" + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Get All Services.yml b/Services_API/Get All Services.yml new file mode 100644 index 0000000..1bda34d --- /dev/null +++ b/Services_API/Get All Services.yml @@ -0,0 +1,15 @@ +info: + name: Get All Services + type: http + seq: 4 + +http: + method: GET + url: "{{baseUrl}}/api/v1/services" + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Get Service by Code.yml b/Services_API/Get Service by Code.yml new file mode 100644 index 0000000..6042353 --- /dev/null +++ b/Services_API/Get Service by Code.yml @@ -0,0 +1,15 @@ +info: + name: Get Service by Code + type: http + seq: 7 + +http: + method: GET + url: "{{baseUrl}}/api/v1/services/code/modules-version2.2" + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Get Service by ID.yml b/Services_API/Get Service by ID.yml new file mode 100644 index 0000000..34518bf --- /dev/null +++ b/Services_API/Get Service by ID.yml @@ -0,0 +1,15 @@ +info: + name: Get Service by ID + type: http + seq: 5 + +http: + method: GET + url: "{{baseUrl}}/api/v1/services/{{serviceId}}" + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Negative - Invalid UUID.yml b/Services_API/Negative - Invalid UUID.yml new file mode 100644 index 0000000..2e4ef54 --- /dev/null +++ b/Services_API/Negative - Invalid UUID.yml @@ -0,0 +1,15 @@ +info: + name: Negative - Invalid UUID + type: http + seq: 10 + +http: + method: GET + url: "{{baseUrl}}/api/v1/services/123" + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Negative - Missing Body.yml b/Services_API/Negative - Missing Body.yml new file mode 100644 index 0000000..88afe1b --- /dev/null +++ b/Services_API/Negative - Missing Body.yml @@ -0,0 +1,21 @@ +info: + name: Negative - Missing Body + type: http + seq: 11 + +http: + method: POST + url: "{{baseUrl}}/api/v1/services" + headers: + - name: Content-Type + value: application/json + body: + type: json + data: "" + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Update Release.yml b/Services_API/Update Release.yml new file mode 100644 index 0000000..e37a470 --- /dev/null +++ b/Services_API/Update Release.yml @@ -0,0 +1,26 @@ +info: + name: Update Release + type: http + seq: 9 + +http: + method: PUT + url: "{{baseUrl}}/api/v1/releases/{{releaseId}}" + headers: + - name: Content-Type + value: application/json + body: + type: json + data: |- + { + "service": "{{serviceId}}", + "version": "1.0.1", + "changelog": "Bug fixes" + } + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/Update Service.yml b/Services_API/Update Service.yml new file mode 100644 index 0000000..fb48ce3 --- /dev/null +++ b/Services_API/Update Service.yml @@ -0,0 +1,26 @@ +info: + name: Update Service + type: http + seq: 6 + +http: + method: PUT + url: "{{baseUrl}}/api/v1/services/{{serviceId}}" + headers: + - name: Content-Type + value: application/json + body: + type: json + data: |- + { + "code": "modules-version2.2", + "name": "Сервис управления версиями модулей", + "type": "SYSTEM" + } + auth: inherit + +settings: + encodeUrl: true + timeout: 0 + followRedirects: true + maxRedirects: 5 diff --git a/Services_API/opencollection.yml b/Services_API/opencollection.yml new file mode 100644 index 0000000..7d666c3 --- /dev/null +++ b/Services_API/opencollection.yml @@ -0,0 +1,23 @@ +opencollection: 1.0.0 + +info: + name: Services API + +request: + variables: + - name: baseUrl + value: http://modules.dev.practic.ordocrm.online + - name: serviceId + value: "" + - name: releaseId + value: "" + +docs: + content: Collection for Services & Releases API testing + type: text/markdown +bundled: false +extensions: + bruno: + ignore: + - node_modules + - .git