MCPcopy Create free account
hub / github.com/ProspectOne/perfops-cli / TestPingOutput

Function TestPingOutput

perfops/run_test.go:173–187  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

171}
172
173func TestPingOutput(t *testing.T) {
174 ctx := context.Background()
175 tr := &recordingTransport{}
176 c, err := newTestClient(tr)
177 if err != nil {
178 t.Fatalf("unexpected error %v", err)
179 }
180 c.Run.PingOutput(ctx, TestID("1234"))
181 if got, exp := tr.req.Method, "GET"; got != exp {
182 t.Fatalf("expected HTTP method %v; got %v", exp, got)
183 }
184 if got, exp := tr.req.URL.Path, "/run/ping/1234"; got != exp {
185 t.Fatalf("expected path %v; got %v", exp, got)
186 }
187}
188
189func TestTraceroute(t *testing.T) {
190 ctx := context.Background()

Callers

nothing calls this directly

Calls 3

newTestClientFunction · 0.85
TestIDTypeAlias · 0.85
PingOutputMethod · 0.80

Tested by

no test coverage detected