fix(actions): state not considered in test payload
All checks were successful
/ build (pull_request) Successful in 3m29s

This commit is contained in:
Varakh 2024-04-26 20:29:11 +02:00
parent 2676ca72a9
commit 6f26fa7d65
4 changed files with 6 additions and 2 deletions

View file

@ -2750,6 +2750,7 @@ components:
- provider
- host
- version
- state
properties:
application:
type: string
@ -2759,6 +2760,8 @@ components:
type: string
version:
type: string
state:
type: string
CreateSecretRequest:
type: object
required:

View file

@ -1506,7 +1506,7 @@
],
"body": {
"mode": "raw",
"raw": "{\n \"application\": \"Test App\",\n \"host\": \"Test Host\",\n \"provider\": \"Test Provider\",\n \"version\": \"Test Version\"\n}",
"raw": "{\n \"application\": \"Test App\",\n \"host\": \"Test Host\",\n \"provider\": \"Test Provider\",\n \"version\": \"Test Version\",\n \"state\": \"Test State\"\n}",
"options": {
"raw": {
"language": "json"

View file

@ -79,6 +79,7 @@ type TestActionRequest struct {
Provider string `json:"provider" binding:"required,min=1"`
Host string `json:"host" binding:"required,min=1"`
Version string `json:"version" binding:"required,min=1"`
State string `json:"state" binding:"required,min=1"`
}
type PaginateUpdateRequest struct {

View file

@ -30,7 +30,7 @@ func (h *actionInvocationHandler) test(c *gin.Context) {
return
}
err = h.actionInvocationService.execute(e, &eventPayloadInformationDto{Application: req.Application, Host: req.Host, Provider: req.Provider, Version: req.Version})
err = h.actionInvocationService.execute(e, &eventPayloadInformationDto{Application: req.Application, Host: req.Host, Provider: req.Provider, Version: req.Version, State: req.State})
isSuccess := err == nil
var message string