Commit 8c6b8ad0 authored by Kirill Smelkov's avatar Kirill Smelkov

xnet/pipenet: Add tests for Host.Network

Should be in d3a7a196 (xnet/pipenet: Package for TCP-like synchronous
in-memory network of net.Pipes)
parent 84d02fa2
// Copyright (C) 2017 Nexedi SA and Contributors.
// Copyright (C) 2017-2018 Nexedi SA and Contributors.
// Kirill Smelkov <kirr@nexedi.com>
//
// This program is free software: you can Use, Study, Modify and Redistribute
......@@ -99,6 +99,9 @@ func TestPipeNet(t *testing.T) {
:= pnet.Host("α")
:= pnet.Host("β")
assertEq(t, .Network(), "pipet")
assertEq(t, .Network(), "pipet")
_, err := .Dial(context.Background(), ":0")
assertEq(t, err, &net.OpError{Op: "dial", Net: "pipet", Addr: xaddr("α:0"), Err: errConnRefused})
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment