mirror of
https://github.com/go-kratos/kratos.git
synced 2025-04-11 11:42:10 +02:00
25 lines
361 B
Go
25 lines
361 B
Go
package main
|
|
|
|
import (
|
|
"path/filepath"
|
|
"testing"
|
|
|
|
"k8s.io/client-go/util/homedir"
|
|
)
|
|
|
|
func TestSource(t *testing.T) {
|
|
home := homedir.HomeDir()
|
|
s := NewSource(
|
|
Namespace("mesh"),
|
|
LabelSelector(""),
|
|
KubeConfig(filepath.Join(home, ".kube", "config")),
|
|
)
|
|
kvs, err := s.Load()
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
for _, v := range kvs {
|
|
t.Log(v)
|
|
}
|
|
}
|