mirror of
https://github.com/YuzuZensai/netbird-kubernetes-operator.git
synced 2026-09-13 18:59:09 +00:00
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:
@@ -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)
|
||||
}
|
||||
Reference in New Issue
Block a user