Skip to content

Commit

Permalink
[CWS] Fix schemas validation in tests (#31219)
Browse files Browse the repository at this point in the history
  • Loading branch information
lebauce authored Nov 19, 2024
1 parent 7a17f31 commit 8dc9452
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/security/tests/schemas.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,13 @@ var upstreamEventSchema = getUpstreamEventSchema()
//nolint:deadcode,unused
func validateActivityDumpProtoSchema(t *testing.T, ad string) bool {
t.Helper()
return validateUrlSchema(t, ad, "file:///activity_dump_proto.schema.json")
return validateStringSchema(t, ad, "file:///activity_dump_proto.schema.json")
}

//nolint:deadcode,unused
func validateMessageSchema(t *testing.T, msg string) bool {
t.Helper()
if !validateUrlSchema(t, msg, "file:///message.schema.json") {
if !validateStringSchema(t, msg, "file:///message.schema.json") {
return false
}
return validateUrlSchema(t, msg, upstreamEventSchema)
Expand Down Expand Up @@ -259,7 +259,7 @@ func validateRuleSetLoadedSchema(t *testing.T, event *events.CustomEvent) bool {
return false
}

return validateUrlSchema(t, string(eventJSON), "file:///ruleset_loaded.schema.json")
return validateStringSchema(t, string(eventJSON), "file:///ruleset_loaded.schema.json")
}

//nolint:deadcode,unused
Expand All @@ -272,7 +272,7 @@ func validateHeartbeatSchema(t *testing.T, event *events.CustomEvent) bool {
return false
}

return validateUrlSchema(t, string(eventJSON), "file:///heartbeat.schema.json")
return validateStringSchema(t, string(eventJSON), "file:///heartbeat.schema.json")
}

// ValidInodeFormatChecker defines the format inode checker
Expand Down

0 comments on commit 8dc9452

Please sign in to comment.