Adding Open Connection Failed Test

pull/39/head
Sarah Jamie Lewis 5 years ago
parent 84d7336602
commit 7f215e86c4
  1. 7
      ricochet_test.go
  2. 2
      testing.md

@ -52,3 +52,10 @@ func TestRicochetOpenWithError(t *testing.T) {
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)
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