-
Notifications
You must be signed in to change notification settings - Fork 662
/
suites.go
38 lines (31 loc) · 960 Bytes
/
suites.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// Copyright (C) 2019-2022, Ava Labs, Inc. All rights reserved.
// See the file LICENSE for licensing terms.
// Implements ping tests, requires network-runner cluster.
package ping
import (
"context"
"time"
"github.com/ava-labs/avalanchego/tests/e2e"
ginkgo "github.com/onsi/ginkgo/v2"
"github.com/onsi/gomega"
)
var _ = ginkgo.Describe("[Ping]", func() {
ginkgo.It("can ping network-runner RPC server",
// use this for filtering tests by labels
// ref. https://onsi.github.io/ginkgo/#spec-labels
ginkgo.Label(
"require-network-runner",
"ping",
),
func() {
if e2e.Env.GetRunnerGRPCEndpoint() == "" {
ginkgo.Skip("no local network-runner, skipping")
}
runnerCli := e2e.Env.GetRunnerClient()
gomega.Expect(runnerCli).ShouldNot(gomega.BeNil())
ctx, cancel := context.WithTimeout(context.Background(), 15*time.Second)
_, err := runnerCli.Ping(ctx)
cancel()
gomega.Expect(err).Should(gomega.BeNil())
})
})