Skip to content

Commit

Permalink
Added manual fin controller test
Browse files Browse the repository at this point in the history
  • Loading branch information
MaartendeKruijf committed Mar 12, 2024
1 parent 19f6163 commit 9966703
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions test/manual/capability/capability_controller_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
package capability_controller_test

import (
"fmt"
"soarca/internal/capability/controller"
"testing"

mqtt "github.com/eclipse/paho.mqtt.golang"
)

func TestConnect(t *testing.T) {
// used for manual testing

// var executionId, _ = uuid.Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
// var playbookId = "playbook--d09351a2-a075-40c8-8054-0b7c423db83f"
// var stepId = "step--81eff59f-d084-4324-9e0a-59e353dbd28f"
// guid := new(guid.Guid)
// prot := protocol.FinProtocol{Guid: guid, Topic: protocol.Topic("testing"), Broker: "localhost", Port: 1883}

options := mqtt.NewClientOptions()
options.AddBroker(fmt.Sprintf("mqtt://localhost:1883"))
options.SetClientID("soarca")
options.SetUsername("public")
options.SetPassword("password")

client := mqtt.NewClient(options)

finController := controller.New(client)
err := finController.Start("localhost", 1883)
fmt.Print(err)

}

0 comments on commit 9966703

Please sign in to comment.