diff options
author | Felix Lange <fjl@twurst.com> | 2019-07-18 20:21:24 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2019-07-18 20:21:24 +0800 |
commit | f088c650a58c1eff8b2b6fe51d7e4b8e9762200f (patch) | |
tree | 90dba6cafbafb70296172a4a78f40b9abf2bf7c1 /rpc | |
parent | 9466b9eec5d7fdff0a43e82e89a3d6fb7aa571a6 (diff) | |
download | go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar.gz go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar.bz2 go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar.lz go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar.xz go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.tar.zst go-tangerine-f088c650a58c1eff8b2b6fe51d7e4b8e9762200f.zip |
all: replace t.Log(); t.FailNow() with t.Fatal() (#19849)
Diffstat (limited to 'rpc')
-rw-r--r-- | rpc/websocket_test.go | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/rpc/websocket_test.go b/rpc/websocket_test.go index 5bf3780d6..2caede474 100644 --- a/rpc/websocket_test.go +++ b/rpc/websocket_test.go @@ -21,34 +21,26 @@ import "testing" func TestWSGetConfigNoAuth(t *testing.T) { config, err := wsGetConfig("ws://example.com:1234", "") if err != nil { - t.Logf("wsGetConfig failed: %s", err) - t.Fail() - return + t.Fatalf("wsGetConfig failed: %s", err) } if config.Location.User != nil { - t.Log("User should have been stripped from the URL") - t.Fail() + t.Fatalf("User should have been stripped from the URL") } if config.Location.Hostname() != "example.com" || config.Location.Port() != "1234" || config.Location.Scheme != "ws" { - t.Logf("Unexpected URL: %s", config.Location) - t.Fail() + t.Fatalf("Unexpected URL: %s", config.Location) } } func TestWSGetConfigWithBasicAuth(t *testing.T) { config, err := wsGetConfig("wss://testuser:test-PASS_01@example.com:1234", "") if err != nil { - t.Logf("wsGetConfig failed: %s", err) - t.Fail() - return + t.Fatalf("wsGetConfig failed: %s", err) } if config.Location.User != nil { - t.Log("User should have been stripped from the URL") - t.Fail() + t.Fatal("User should have been stripped from the URL") } if config.Header.Get("Authorization") != "Basic dGVzdHVzZXI6dGVzdC1QQVNTXzAx" { - t.Log("Basic auth header is incorrect") - t.Fail() + t.Fatal("Basic auth header is incorrect") } } |