You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficcontrol.apache.org by zr...@apache.org on 2021/05/07 20:33:57 UTC

[trafficcontrol] branch master updated: Fixed unreachable code on logout_test.go and plugin_verifier.go (#5823)

This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git


The following commit(s) were added to refs/heads/master by this push:
     new 88064f0  Fixed unreachable code on logout_test.go and plugin_verifier.go (#5823)
88064f0 is described below

commit 88064f0f8c86ef777323769b013b9d1414b7584c
Author: Ayush Anand <73...@users.noreply.github.com>
AuthorDate: Sat May 8 02:03:34 2021 +0530

    Fixed unreachable code on logout_test.go and plugin_verifier.go (#5823)
---
 traffic_ops/traffic_ops_golang/login/logout_test.go | 4 ++--
 traffic_ops_ort/plugin_verifier/plugin_verifier.go  | 2 --
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/traffic_ops/traffic_ops_golang/login/logout_test.go b/traffic_ops/traffic_ops_golang/login/logout_test.go
index 10bd9c8..bf7cd3c 100644
--- a/traffic_ops/traffic_ops_golang/login/logout_test.go
+++ b/traffic_ops/traffic_ops_golang/login/logout_test.go
@@ -129,10 +129,10 @@ func TestLogout(t *testing.T) {
 
 		if time.Second < time.Since(c.Expires) || -time.Second > time.Since(c.Expires) {
 			t.Errorf("Expected cookie expiration to be within one second of now, but was %s", time.Since(c.Expires))
+			break
 		}
-		break
 
-		parsedCookie, err := tocookie.Parse("secret", c.Value)
+		parsedCookie, err := tocookie.Parse("test", c.Value)
 		if err != nil {
 			t.Errorf("Failed to parse cookie value: %v", err)
 			break
diff --git a/traffic_ops_ort/plugin_verifier/plugin_verifier.go b/traffic_ops_ort/plugin_verifier/plugin_verifier.go
index 7cecdaa..a6e4b4a 100644
--- a/traffic_ops_ort/plugin_verifier/plugin_verifier.go
+++ b/traffic_ops_ort/plugin_verifier/plugin_verifier.go
@@ -257,8 +257,6 @@ func verifyPlugin(filename string) bool {
 	} else {
 		return fileExists(filepath.Join(cfg.TrafficServerPluginDir, filename))
 	}
-
-	return true
 }
 
 func main() {