From 7ae6c916c6165f83a508cf1b208bfdb56c1119f0 Mon Sep 17 00:00:00 2001 From: Sylvain Baubeau Date: Tue, 19 Nov 2024 11:50:16 +0100 Subject: [PATCH] Fix schemas validation in tests --- pkg/security/tests/schemas.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/security/tests/schemas.go b/pkg/security/tests/schemas.go index 0ee7d7767b9e7..a9fcacc601369 100644 --- a/pkg/security/tests/schemas.go +++ b/pkg/security/tests/schemas.go @@ -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) @@ -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 @@ -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