Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lucamrgs committed Jan 10, 2025
1 parent afbbf8a commit e389d9e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions pkg/core/capability/manual/interaction/interaction_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion pkg/models/manual/manual.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit e389d9e

Please sign in to comment.