Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[CWS] Fix schemas validation in tests #31219

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading