Skip to content

Commit

Permalink
renaming of variables
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbITCybErSeC committed Mar 8, 2024
1 parent f9e19bf commit 9032f39
Showing 1 changed file with 8 additions and 10 deletions.
18 changes: 8 additions & 10 deletions test/unittest/capability/openc2/openc2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,22 @@ import (
"github.com/google/uuid"
)

func TestHTTPOptionsCorrectlyGenerated(t *testing.T) {
func TestOpenC2Request(t *testing.T) {
mockHttp := &mockRequest.MockHttpRequest{}
openc2 := openc2.New(mockHttp)

authId := "6ba7b810-9dad-11d1-80b4-00c04fd430c9"
authId, _ := uuid.Parse("6aa7b810-9dad-11d1-81b4-00c04fd430c8")
executionId, _ := uuid.Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
playbookId, _ := uuid.Parse("d09351a2-a075-40c8-8054-0b7c423db83f")
stepId, _ := uuid.Parse("81eff59f-d084-4324-9e0a-59e353dbd28f")

target := cacao.AgentTarget{
HttpUrl: "https://soarca.tno.nl",
AuthInfoIdentifier: authId,
AuthInfoIdentifier: authId.String(),
}

auth := cacao.AuthenticationInformation{
ID: authId,
ID: authId.String(),
Type: "oauth2",
Token: "this-is-a-test",
}
Expand All @@ -41,10 +45,6 @@ func TestHTTPOptionsCorrectlyGenerated(t *testing.T) {
Value: "",
}

executionId, _ := uuid.Parse("6ba7b810-9dad-11d1-80b4-00c04fd430c8")
playbookId, _ := uuid.Parse("d09351a2-a075-40c8-8054-0b7c423db83f")
stepId, _ := uuid.Parse("81eff59f-d084-4324-9e0a-59e353dbd28f")

metadata := execution.Metadata{
ExecutionId: executionId,
PlaybookId: playbookId.String(),
Expand Down Expand Up @@ -75,6 +75,4 @@ func TestHTTPOptionsCorrectlyGenerated(t *testing.T) {
}
t.Log(results)
assert.Equal(t, results["__soarca_openc2_result__"].Value, payload)

// mockHttp.AssertExpectations(t)
}

0 comments on commit 9032f39

Please sign in to comment.