Browse Source

Fail test when TLS dials don't succeed

Rod Hynes 7 years ago
parent
commit
60df82974e
1 changed files with 7 additions and 1 deletions
  1. 7 1
      psiphon/tlsCompatibility_test.go

+ 7 - 1
psiphon/tlsCompatibility_test.go

@@ -21,6 +21,7 @@ package psiphon
 
 
 import (
 import (
 	"context"
 	"context"
+	"fmt"
 	"io/ioutil"
 	"io/ioutil"
 	"net"
 	"net"
 	"strings"
 	"strings"
@@ -152,6 +153,11 @@ func testTLSCompatibility(t *testing.T, address string) {
 			time.Sleep(100 * time.Millisecond)
 			time.Sleep(100 * time.Millisecond)
 		}
 		}
 
 
-		t.Logf("%s: %d/%d successful\n", tlsProfile, success, repeats)
+		result := fmt.Sprintf("%s: %d/%d successful\n", tlsProfile, success, repeats)
+		if success == repeats {
+			t.Logf(result)
+		} else {
+			t.Errorf(result)
+		}
 	}
 	}
 }
 }