2025-07-06 15:31:21 +02:00
|
|
|
package labelstructs_test
|
|
|
|
|
|
|
|
import (
|
|
|
|
"testing"
|
2025-08-19 23:09:50 +02:00
|
|
|
|
2025-08-19 23:58:51 +02:00
|
|
|
"katenary.io/internal/generator/labels/labelstructs"
|
2025-07-06 15:31:21 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
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])
|
|
|
|
}
|
|
|
|
}
|