forked from openprivacy/libricochet-go
Adding Open Connection Failed Test
This commit is contained in:
parent
84d7336602
commit
7f215e86c4
|
@ -52,3 +52,10 @@ func TestRicochetOpenWithError(t *testing.T) {
|
||||||
t.Errorf("Open should have failed because of bad version negotiation.")
|
t.Errorf("Open should have failed because of bad version negotiation.")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func TestRicochetOpenWithNoServer(t *testing.T) {
|
||||||
|
_, err := Open("127.0.0.1:11002|abcdefghijklmno.onion")
|
||||||
|
if err == nil {
|
||||||
|
t.Errorf("Open should have failed because of bad version negotiation.")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ links it to the automated test that exercises that functionality.
|
||||||
|
|
||||||
File: [iricochet_test.go](./ricochet_test.go)
|
File: [iricochet_test.go](./ricochet_test.go)
|
||||||
|
|
||||||
This stub test exercises the Open() function. `TestRicochetOpen`, `TestRicochetOpenWithError`.
|
This stub test exercises the Open() function. `TestRicochetOpen`, and in cases where the server returns a bad version, `TestRicochetOpenWithError`, and where there is no server at all `TestRicochetOpenWithNoServer` - in both cases Open should return an error.
|
||||||
|
|
||||||
## Inbound
|
## Inbound
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue