Add tests to k8sutil (#296)

Adds more unit tests to sections that are easy to test.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **Tests**
* Added unit tests for Kubernetes owner-reference and finalizer helper
functions to ensure correct behavior.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
This commit is contained in:
Philip Laine
2026-06-15 13:57:14 +02:00
committed by GitHub
parent 2dbfde779a
commit 5e5e37a153
3 changed files with 75 additions and 3 deletions
+16
View File
@@ -0,0 +1,16 @@
// SPDX-License-Identifier: BSD-3-Clause
package k8sutil
import (
"testing"
"github.com/go-openapi/testify/v2/require"
)
func TestFinalizer(t *testing.T) {
t.Parallel()
res := Finalizer("foo")
require.Equal(t, "finalizers.netbird.io/foo", res)
}