diff --git a/pkg/core/capability/manual/interaction/interaction_test.go b/pkg/core/capability/manual/interaction/interaction_test.go index 2e0a382e..a3ff1eec 100644 --- a/pkg/core/capability/manual/interaction/interaction_test.go +++ b/pkg/core/capability/manual/interaction/interaction_test.go @@ -171,14 +171,14 @@ func TestGetAllPendingInteractions(t *testing.T) { expectedInteractionsJson := ` [ { - "type": "test_type", + "type": "test_type", "execution_id": "61a6c41e-6efc-4516-a242-dfbc5c89d562", "playbook_id": "test_playbook_id", "step_id": "test_step_id", "description": "test_description", "command": "test_command", "commandb64": "test_command_b64", - "targets": { + "target": { "id": "test_id", "type": "test_type", "name": "test_name", @@ -203,7 +203,7 @@ func TestGetAllPendingInteractions(t *testing.T) { "description": "test_description", "command": "test_command", "commandb64": "test_command_b64", - "targets": { + "target": { "id": "test_id", "type": "test_type", "name": "test_name", @@ -232,6 +232,7 @@ func TestGetAllPendingInteractions(t *testing.T) { t.Log(expectedInteractions) receivedInteractions := interaction.getAllPendingInteractions() + fmt.Println(receivedInteractions) if !reflect.DeepEqual(expectedInteractions, receivedInteractions) { err = fmt.Errorf("expected %v, but got %v", expectedInteractions, receivedInteractions) diff --git a/pkg/models/manual/manual.go b/pkg/models/manual/manual.go index 73b4d5db..3b680023 100644 --- a/pkg/models/manual/manual.go +++ b/pkg/models/manual/manual.go @@ -20,7 +20,7 @@ type InteractionCommandData struct { Description string `bson:"description" json:"description" validate:"required"` // The description from the workflow step Command string `bson:"command" json:"command" validate:"required"` // The command for the agent either command CommandBase64 string `bson:"commandb64,omitempty" json:"commandb64,omitempty"` // The command in b64 if present - Target cacao.AgentTarget `bson:"targets" json:"targets" validate:"required"` // Map of cacao agent-target with the target(s) of this command + Target cacao.AgentTarget `bson:"target" json:"target" validate:"required"` // Map of cacao agent-target with the target(s) of this command OutVariables cacao.Variables `bson:"out_args" json:"out_args" validate:"required"` // Map of cacao variables handled in the step out args with current values and definitions }