Explorar el Código

travis build fix

Jonathan Turner hace 7 años
padre
commit
b01facb9d5
Se han modificado 1 ficheros con 7 adiciones y 1 borrados
  1. 7 1
      keytab/keytab_test.go

+ 7 - 1
keytab/keytab_test.go

@@ -2,6 +2,7 @@ package keytab
 
 
 import (
 import (
 	"encoding/hex"
 	"encoding/hex"
+	"os"
 	"testing"
 	"testing"
 	"time"
 	"time"
 
 
@@ -50,7 +51,12 @@ func TestMarshal(t *testing.T) {
 
 
 func TestLoad(t *testing.T) {
 func TestLoad(t *testing.T) {
 	t.Parallel()
 	t.Parallel()
-	kt, err := Load("test/testdata/testuser1.testtab")
+	f := "test/testdata/testuser1.testtab"
+	dir := os.Getenv("TRAVIS_BUILD_DIR")
+	if dir != "" {
+		f = dir + "/" + f
+	}
+	kt, err := Load(f)
 	if err != nil {
 	if err != nil {
 		t.Fatalf("could not load keytab: %v", err)
 		t.Fatalf("could not load keytab: %v", err)
 	}
 	}