Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
leon3s committed Jan 8, 2024
1 parent e7e1fcc commit a630b4f
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 39 deletions.
76 changes: 38 additions & 38 deletions bin/nanocld/specs/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -854,6 +854,44 @@ paths:
type: array
items:
$ref: '#/components/schemas/Process'
/processes/{kind}/{name}/kill:
post:
tags:
- Processes
summary: Send a signal to processes of given kind and name
description: Send a signal to processes of given kind and name
operationId: kill_process
parameters:
- name: kind
in: path
description: Kind of the process
required: true
schema:
type: string
example: cargo
- name: name
in: path
description: Name of the process
required: true
schema:
type: string
example: deploy-example
- name: namespace
in: query
description: Namespace where the process belongs is needed
required: false
schema:
type: string
nullable: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CargoKillOptions'
required: true
responses:
'200':
description: Process instances killed
/processes/{kind}/{name}/logs:
get:
tags:
Expand Down Expand Up @@ -1038,44 +1076,6 @@ paths:
description: Job wait
'404':
description: Job does not exist
/processes/{name}/kill:
post:
tags:
- Processes
summary: Send a signal to processes of given kind and name
description: Send a signal to processes of given kind and name
operationId: kill_process
parameters:
- name: kind
in: path
description: Kind of the process
required: true
schema:
type: string
example: cargo
- name: name
in: path
description: Name of the process
required: true
schema:
type: string
example: deploy-example
- name: namespace
in: query
description: Namespace where the process belongs is needed
required: false
schema:
type: string
nullable: true
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/CargoKillOptions'
required: true
responses:
'200':
description: Process instances killed
/resource/kinds:
get:
tags:
Expand Down
2 changes: 1 addition & 1 deletion bin/nanocld/src/services/job.rs
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ mod tests {
let _ = res.json::<Vec<JobSummary>>().await.unwrap();
let res = client
.send_get(
&format!("{job_endpoint}/wait"),
&format!("/processes/job/{}/wait", &job.name),
Some(&serde_json::json!({
"Condition": "yoloh"
})),
Expand Down

0 comments on commit a630b4f

Please sign in to comment.