From c3c4da3619bb33438ea5a1ff2227443e3d53af60 Mon Sep 17 00:00:00 2001 From: Krzesimir Nowak Date: Wed, 15 Apr 2015 17:40:04 +0200 Subject: [PATCH] functional tests: Simplify running the test server --- tests/rkt_auth_test.go | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/tests/rkt_auth_test.go b/tests/rkt_auth_test.go index 52aebff..3800e70 100644 --- a/tests/rkt_auth_test.go +++ b/tests/rkt_auth_test.go @@ -18,7 +18,6 @@ import ( "fmt" "io/ioutil" "os" - "os/exec" "path/filepath" "strings" "testing" @@ -135,9 +134,7 @@ func testAuthIgnoreSubdirectories(t *testing.T, server *taas.Server) { } func runServer(t *testing.T, auth taas.Type) *taas.Server { - goTool := getAbs(t, "go") - acTool := getAbs(t, "../bin/actool") - server, err := taas.NewServerWithPaths(auth, 20, acTool, goTool) + server, err := taas.NewServerWithPaths(auth, 20, "../bin/actool", "go") if err != nil { t.Fatalf("Could not start server: %v", err) } @@ -145,19 +142,6 @@ func runServer(t *testing.T, auth taas.Type) *taas.Server { return server } -func getAbs(t *testing.T, tool string) string { - baseTool := filepath.Base(tool) - pathTool, err := exec.LookPath(tool) - if err != nil { - t.Fatalf("Could not find %s, required to run server: %v", baseTool, err) - } - absTool, err := filepath.Abs(pathTool) - if err != nil { - t.Fatalf("Could not get absolute path of %s, required to run server: %v", baseTool, err) - } - return absTool -} - func serverHandler(t *testing.T, server *taas.Server) { for { select {