From f7a84e366296a1598cec66363c80e39f67a75b1b Mon Sep 17 00:00:00 2001 From: Matthias Hanel Date: Mon, 17 Feb 2020 14:03:30 -0500 Subject: [PATCH] Removed unnecessary else Signed-off-by: Matthias Hanel --- server/opts_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/opts_test.go b/server/opts_test.go index 822d7fe6..8675861a 100644 --- a/server/opts_test.go +++ b/server/opts_test.go @@ -1162,13 +1162,15 @@ func TestPingIntervalOld(t *testing.T) { err := opts.ProcessConfigFile(conf) if err == nil { t.Fatalf("expected an error") - } else if err, ok := err.(*processConfigErr); !ok { + } + if err, ok := err.(*processConfigErr); !ok { t.Fatalf("expected an error of type processConfigErr") } else if len(err.warnings) != 1 { t.Fatalf("expected processConfigErr to have one warning") } else if len(err.errors) != 0 { t.Fatalf("expected processConfigErr to have no error") - } else if opts.PingInterval != 5*time.Second { + } + if opts.PingInterval != 5*time.Second { t.Fatalf("expected ping interval to be 5 seconds") } } @@ -1180,7 +1182,8 @@ func TestPingIntervalNew(t *testing.T) { err := opts.ProcessConfigFile(conf) if err != nil { t.Fatalf("expected no error") - } else if opts.PingInterval != 5*time.Minute { + } + if opts.PingInterval != 5*time.Minute { t.Fatalf("expected ping interval to be 5 minutes") } }