(t *testing.T)
| 140 | } |
| 141 | |
| 142 | func TestUsingAfterDisconnect(t *testing.T) { |
| 143 | l := NewWithDialer(testDialer(t)) |
| 144 | |
| 145 | if err := l.Connect(); err != nil { |
| 146 | t.Fatal(err) |
| 147 | } |
| 148 | |
| 149 | if err := l.Disconnect(); err != nil { |
| 150 | t.Fatal(err) |
| 151 | } |
| 152 | |
| 153 | // should fail because Disconnect was already called |
| 154 | _, err := l.DomainLookupByName(testDomainName) |
| 155 | if err == nil { |
| 156 | t.Fatal("using a disconnected libvirt should fail") |
| 157 | } |
| 158 | } |
| 159 | |
| 160 | func TestLostConnection(t *testing.T) { |
| 161 | // In order to be able to close the connection external to libvirt, |
nothing calls this directly
no test coverage detected
searching dependent graphs…