mirror of
https://github.com/Control-D-Inc/ctrld.git
synced 2026-09-04 13:36:35 +02:00
feat(cli): add ctrld diag for provisioning support
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package controld
|
||||
|
||||
import (
|
||||
"context"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestProbeReachabilityRespectsCancelledContext(t *testing.T) {
|
||||
ctx, cancel := context.WithCancel(context.Background())
|
||||
cancel()
|
||||
if err := ProbeReachability(ctx, false); err == nil {
|
||||
t.Error("expected an error for an already-cancelled context")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user