func (s *remoteSuite) TestUsingTCPNoop(c *gc.C) { remote := lxdclient.Remote{ Name: "my-remote", Host: "some-host", Cert: s.Cert, } nonlocal, err := remote.UsingTCP() c.Assert(err, jc.ErrorIsNil) c.Check(nonlocal, jc.DeepEquals, remote) }
func (s *remoteFunctionalSuite) TestUsingTCP(c *gc.C) { if _, err := net.InterfaceByName(lxc.DefaultLxcBridge); err != nil { c.Skip("network bridge interface not found") } remote := lxdclient.Remote{ Name: "my-remote", Host: "", Cert: nil, } nonlocal, err := remote.UsingTCP() c.Assert(err, jc.ErrorIsNil) checkValidRemote(c, &nonlocal) c.Check(nonlocal, jc.DeepEquals, lxdclient.Remote{ Name: "my-remote", Host: nonlocal.Host, Cert: nonlocal.Cert, }) }