Skip to content

Commit

Permalink
Merge branch 'main' into pin-5339_multiple-add-users-client-producer-…
Browse files Browse the repository at this point in the history
…keychain
  • Loading branch information
Carminepo2 authored Oct 2, 2024
2 parents de0af9e + f86da4e commit 51fae82
Show file tree
Hide file tree
Showing 36 changed files with 909 additions and 35 deletions.
1 change: 1 addition & 0 deletions collections/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.env
9 changes: 9 additions & 0 deletions collections/bruno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"version": "1",
"name": "PagoPA Interop",
"type": "collection",
"ignore": [
"node_modules",
".git"
]
}
27 changes: 27 additions & 0 deletions collections/catalog/Activate Descriptor.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
meta {
name: Activate Descriptor
type: http
seq: 14
}

post {
url: {{host-catalog}}/eservices/:eserviceId/descriptors/:descriptorId/activate
body: none
auth: none
}

params:path {
eserviceId: {{eServiceId}}
descriptorId: {{descriptorId}}
}

headers {
Cache-Control: no-cache
Content-Length: 0
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}
47 changes: 47 additions & 0 deletions collections/catalog/Add Descriptors Document.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
meta {
name: Add Descriptors Document
type: http
seq: 18
}

post {
url: {{host-catalog}}/eservices/:eserviceId/descriptors/:descriptorId/documents
body: json
auth: none
}

params:path {
eserviceId: {{eServiceId}}
descriptorId: {{descriptorId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}

body:json {
{
"documentId": "5d6d2677-f6b3-4c2a-ae25-d9685cb464b0",
"kind": "INTERFACE",
"prettyName": "Test File Name",
"filePath": "eservices/docs/5d6d2677-f6b3-4c2a-ae25-d9685cb464b0/testfile",
"fileName": "testfile",
"contentType": "test",
"checksum": "checksum",
"serverUrls": [
"server urls 1",
"server urls 2"
]
}
}

vars:post-response {
interfaceId: res.body.descriptors[0].interface.id
}
27 changes: 27 additions & 0 deletions collections/catalog/Archive Descriptor.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
meta {
name: Archive Descriptor
type: http
seq: 10
}

post {
url: {{host-catalog}}/eservices/:eServiceId/descriptors/:descriptorId/archive
body: json
auth: none
}

params:path {
eServiceId: {{eServiceId}}
descriptorId: {{descriptorId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}
27 changes: 27 additions & 0 deletions collections/catalog/Clone Descriptor.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
meta {
name: Clone Descriptor
type: http
seq: 9
}

post {
url: {{host-catalog}}/eservices/:eserviceId/descriptors/:descriptorId/clone
body: json
auth: none
}

params:path {
eserviceId: {{eServiceId}}
descriptorId: {{descriptorId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}
48 changes: 48 additions & 0 deletions collections/catalog/Create Descriptor.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
meta {
name: Create Descriptor
type: http
seq: 8
}

post {
url: {{host-catalog}}/eservices/:eserviceId/descriptors
body: json
auth: none
}

params:path {
eserviceId: {{eServiceId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}

body:json {
{
"description": "testone testone",
"audience": [
"string"
],
"voucherLifespan": 86400,
"dailyCallsPerConsumer": 100,
"dailyCallsTotal": 100,
"agreementApprovalPolicy": "AUTOMATIC",
"attributes": {
"certified": [
],
"declared": [
],
"verified": [
]
},
"docs": []
}
}
44 changes: 44 additions & 0 deletions collections/catalog/Create Eservice.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
meta {
name: Create Eservice
type: http
seq: 1
}

post {
url: {{host-catalog}}/eservices
body: json
auth: none
}

headers {
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Accept: application/json
}

body:json {
{
"name": "{{randomName}}",
"description": "this is a test again",
"technology": "REST",
"mode": "DELIVER",
"descriptor": {
"audience": [ "string" ],
"voucherLifespan": 86400,
"dailyCallsPerConsumer": 100,
"dailyCallsTotal": 100,
"agreementApprovalPolicy": "MANUAL"
}
}
}

vars:post-response {
eServiceId: res.body.id
descriptorId: res.body.descriptors[0].id
}

script:pre-request {
const random = Math.round(Math.random() * 100)

bru.setVar("randomName",`test name ${random}`)
}
39 changes: 39 additions & 0 deletions collections/catalog/Create Risk Analysis.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
meta {
name: Create Risk Analysis
type: http
seq: 5
}

post {
url: {{host-catalog}}/eservices/:eServiceId/riskAnalysis
body: json
auth: none
}

params:path {
eServiceId: {{eServiceId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}

body:json {
{
"name": "Test risk analysis",
"riskAnalysisForm": {
"version": "3.0",
"answers": {
"purpose": ["INSTITUTIONAL"],
"institutionalPurpose":["MyPurpose"]
}
}
}
}
28 changes: 28 additions & 0 deletions collections/catalog/Delete Descriptor Document.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
meta {
name: Delete Descriptor Document
type: http
seq: 19
}

delete {
url: {{host-catalog}}/eservices/:eServiceId/descriptors/:descriptorId/documents/:documentId
body: json
auth: none
}

params:path {
eServiceId: {{eServiceId}}
descriptorId: {{descriptorId}}
documentId: {{interfaceId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}
27 changes: 27 additions & 0 deletions collections/catalog/Delete Descriptor.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
meta {
name: Delete Descriptor
type: http
seq: 11
}

delete {
url: {{host-catalog}}/eservices/:eserviceId/descriptors/:descriptorId
body: json
auth: none
}

params:path {
eserviceId: {{eServiceId}}
descriptorId: {{descriptorId}}
}

headers {
Cache-Control: no-cache
Content-Type: application/json
Accept: */*
Accept-Encoding: gzip, deflate, br
Connection: keep-alive
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Content-Type: application/json
}
43 changes: 43 additions & 0 deletions collections/catalog/Delete Eservice.bru
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
meta {
name: Delete Eservice
type: http
seq: 22
}

delete {
url: {{host-catalog}}/eservices/:eServiceId
body: json
auth: none
}

params:path {
eServiceId: {{eServiceId}}
}

headers {
Authorization: {{JWT}}
X-Correlation-Id: {{correlation-id}}
Accept: application/json
}

body:json {
{
"name": "{{name}}",
"description": "this is a test again",
"technology": "REST",
"mode": "DELIVER",
"descriptor": {
"audience": [ "string" ],
"voucherLifespan": 86400,
"dailyCallsPerConsumer": 100,
"dailyCallsTotal": 100,
"agreementApprovalPolicy": "MANUAL"
}
}
}

script:pre-request {
const random = Math.round(Math.random() * 100)

bru.setVar("name",`test name ${random}`)
}
Loading

0 comments on commit 51fae82

Please sign in to comment.