diff --git a/pkg/security/secl/compiler/eval/context.go b/pkg/security/secl/compiler/eval/context.go index 6348329b3ed6b1..c62434b27d44a9 100644 --- a/pkg/security/secl/compiler/eval/context.go +++ b/pkg/security/secl/compiler/eval/context.go @@ -66,14 +66,6 @@ func (c *Context) Reset() { clear(c.resolvedFields) } -func (c *Context) AppendResolvedField(field string) { - if field == "" { - return - } - - c.resolvedFields = append(c.resolvedFields, field) -} - func (c *Context) GetResolvedFields() []string { return c.resolvedFields } diff --git a/pkg/security/secl/compiler/eval/context_funtests.go b/pkg/security/secl/compiler/eval/context_funtests.go new file mode 100644 index 00000000000000..4c0a56683d9ea5 --- /dev/null +++ b/pkg/security/secl/compiler/eval/context_funtests.go @@ -0,0 +1,18 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +//go:build functionaltests + +// Package eval holds eval related files +package eval + +// AppendResolvedField instructs the context that this field has been resolved +func (c *Context) AppendResolvedField(field string) { + if field == "" { + return + } + + c.resolvedFields = append(c.resolvedFields, field) +} diff --git a/pkg/security/secl/compiler/eval/context_regular.go b/pkg/security/secl/compiler/eval/context_regular.go new file mode 100644 index 00000000000000..b2a8ff0d71851d --- /dev/null +++ b/pkg/security/secl/compiler/eval/context_regular.go @@ -0,0 +1,13 @@ +// Unless explicitly stated otherwise all files in this repository are licensed +// under the Apache License Version 2.0. +// This product includes software developed at Datadog (https://www.datadoghq.com/). +// Copyright 2016-present Datadog, Inc. + +//go:build !functionaltests + +// Package eval holds eval related files +package eval + +// AppendResolvedField is a no-op outside of functional tests +func (c *Context) AppendResolvedField(_ string) { +}