mirror of
https://github.com/kubenetworks/kubevpn.git
synced 2025-12-24 11:51:13 +08:00
21 lines
463 B
Go
21 lines
463 B
Go
package inject
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"k8s.io/apimachinery/pkg/labels"
|
|
)
|
|
|
|
func TestLabelMatch(t *testing.T) {
|
|
selector := map[string]string{
|
|
"app": "universer",
|
|
"app.kubernetes.io/name": "universer",
|
|
}
|
|
podLabels := map[string]string{
|
|
"app": "universer",
|
|
"app.kubernetes.io/name": "universer",
|
|
"version": "ai-chat-flow",
|
|
}
|
|
t.Log(labels.SelectorFromSet(selector).Matches(labels.Set(podLabels)))
|
|
}
|