feat(tests): Add tests for label structures

This commit is contained in:
2025-07-06 15:31:21 +02:00
parent fa3befaa88
commit d163700147
12 changed files with 215 additions and 2 deletions

View File

@@ -0,0 +1,17 @@
package labelstructs_test
import (
"katenary/generator/labels/labelstructs"
"testing"
)
func TestConfigMapFileFrom(t *testing.T) {
ts := "- foo/bar"
tc2, _ := labelstructs.ConfigMapFileFrom(ts)
if len(tc2) != 1 {
t.Errorf("Expected ConfigMapFile to have 1 item, got %d", len(tc2))
}
if tc2[0] != "foo/bar" {
t.Errorf("Expected ConfigMapFile to contain 'foo/bar', got %s", tc2[0])
}
}