créer collection bruno pour test d'api
This commit is contained in:
@@ -0,0 +1 @@
|
||||
.env
|
||||
@@ -0,0 +1,24 @@
|
||||
meta {
|
||||
name: Get Token
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{keycloakUrl}}/protocol/openid-connect/token
|
||||
body: formUrlEncoded
|
||||
auth: none
|
||||
}
|
||||
|
||||
body:form-urlencoded {
|
||||
grant_type: password
|
||||
client_id: {{clientId}}
|
||||
username: {{username}}
|
||||
password: {{password}}
|
||||
}
|
||||
|
||||
script:post-response {
|
||||
if (res.status === 200) {
|
||||
bru.setEnvVar("accessToken", res.body.access_token);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"version": "1",
|
||||
"name": "Bonsai API",
|
||||
"type": "collection",
|
||||
"ignore": []
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
vars {
|
||||
baseUrl: http://localhost:8080/api
|
||||
keycloakUrl: https://auth.goutailler-olivier.com/realms/bonsai
|
||||
clientId: bonsai-webapp
|
||||
}
|
||||
|
||||
vars:secret [
|
||||
username,
|
||||
password,
|
||||
clientSecret,
|
||||
accessToken
|
||||
]
|
||||
@@ -0,0 +1,11 @@
|
||||
vars {
|
||||
baseUrl: https://bonsai.goutailler-olivier.com/api
|
||||
keycloakUrl: https://auth.goutailler-olivier.com/realms/bonsai
|
||||
clientId: bonsai-webapp
|
||||
}
|
||||
vars:secret [
|
||||
username,
|
||||
password,
|
||||
clientSecret,
|
||||
accessToken
|
||||
]
|
||||
@@ -0,0 +1,32 @@
|
||||
meta {
|
||||
name: Create Issue
|
||||
type: http
|
||||
seq: 2
|
||||
}
|
||||
|
||||
post {
|
||||
url: {{baseUrl}}/issues
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{accessToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"type": "Story",
|
||||
"name": "Nouvelle issue",
|
||||
"priority": "Moyenne",
|
||||
"status": "todo",
|
||||
"progress": 0,
|
||||
"assignee": null,
|
||||
"epic": null,
|
||||
"dueDate": null,
|
||||
"description": null,
|
||||
"estimatedTime": null,
|
||||
"dependsOnIds": [],
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Delete Issue
|
||||
type: http
|
||||
seq: 4
|
||||
}
|
||||
|
||||
delete {
|
||||
url: {{baseUrl}}/issues/1
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{accessToken}}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
meta {
|
||||
name: Get All Issues
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/issues
|
||||
body: none
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{accessToken}}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
meta {
|
||||
name: Update Issue
|
||||
type: http
|
||||
seq: 3
|
||||
}
|
||||
|
||||
put {
|
||||
url: {{baseUrl}}/issues/1
|
||||
body: json
|
||||
auth: bearer
|
||||
}
|
||||
|
||||
auth:bearer {
|
||||
token: {{accessToken}}
|
||||
}
|
||||
|
||||
body:json {
|
||||
{
|
||||
"type": "Story",
|
||||
"name": "Issue mise à jour",
|
||||
"priority": "Haute",
|
||||
"status": "in-progress",
|
||||
"progress": 50,
|
||||
"assignee": null,
|
||||
"epic": null,
|
||||
"dueDate": "2026-06-01",
|
||||
"description": null,
|
||||
"estimatedTime": 3.5,
|
||||
"dependsOnIds": [],
|
||||
"comments": []
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
meta {
|
||||
name: Get Version
|
||||
type: http
|
||||
seq: 1
|
||||
}
|
||||
|
||||
get {
|
||||
url: {{baseUrl}}/version
|
||||
body: none
|
||||
auth: none
|
||||
}
|
||||
Reference in New Issue
Block a user