INNER CODE UNIT · Go

TestQueryWithLabel

yahoo/vssh · client_test.go:212

func TestQueryWithLabel(t *testing.T) {
	vs := New()
	vs.Start()

	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

	timeout, _ := time.ParseDuration("2s")
	config := GetConfigUserPass("vssh", "vssh")

	labels := map[string]string{"POP": "ORD"}
	vs.AddClient(testSrvAddr, config, SetLabels(labels), DisableRequestPty())

	vs.Wait(100)

	respChan, err := vs.RunWithLabel(ctx, "ping", "POP==LAX", timeout)
	if err != nil {
		t.Fatal(err)

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…