x/crypto/otr: make errors fatal.
Since the test against libotr (disabled by default) runs forever, any errors should be fatal otherwise they'll never be noticed. Change-Id: Idf07dd963260f140be1950afcbd04331b56bd627 Reviewed-on: https://go-review.googlesource.com/16935 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
+3
-3
@@ -450,7 +450,7 @@ func TestAgainstLibOTR(t *testing.T) {
|
||||
if change == NewKeys {
|
||||
alicesMessage, err := alice.Send([]byte("Go -> libotr test message"))
|
||||
if err != nil {
|
||||
t.Errorf("error sending message: %s", err.Error())
|
||||
t.Fatalf("error sending message: %s", err.Error())
|
||||
} else {
|
||||
for _, msg := range alicesMessage {
|
||||
out.Write(msg)
|
||||
@@ -460,10 +460,10 @@ func TestAgainstLibOTR(t *testing.T) {
|
||||
}
|
||||
if len(text) > 0 {
|
||||
if !bytes.Equal(text, expectedText) {
|
||||
t.Errorf("expected %x, but got %x", expectedText, text)
|
||||
t.Fatalf("expected %x, but got %x", expectedText, text)
|
||||
}
|
||||
if !encrypted {
|
||||
t.Error("message wasn't encrypted")
|
||||
t.Fatal("message wasn't encrypted")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user