From fad816ca717a89f370e3b44b82cf1abf52cd4289 Mon Sep 17 00:00:00 2001
From: Daniel <dhaavi@users.noreply.github.com>
Date: Tue, 24 Sep 2019 12:08:59 +0200
Subject: [PATCH] Fix travis and test script (#13)

* Fix tests deps installation

* Fix test install script (exit after install)

* Use .gitattributes to control line endings

* Clean up deps
---
 .gitattributes |  6 ++++++
 .travis.yml    |  1 +
 Gopkg.lock     | 18 +-----------------
 Gopkg.toml     |  4 ----
 test           |  1 +
 5 files changed, 9 insertions(+), 21 deletions(-)
 create mode 100644 .gitattributes

diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..6aa68cd
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,6 @@
+# Treat all Go files in this repo as binary, with no git magic updating
+# line endings. Windows users contributing to Go will need to use a
+# modern version of git and editors capable of LF line endings.
+
+*.go -text diff=golang
+
diff --git a/.travis.yml b/.travis.yml
index f2d0b63..4d85a1b 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -15,5 +15,6 @@ install:
   - go get -d -u github.com/golang/dep
   - go install github.com/golang/dep/cmd/dep
   - dep ensure
+  - ./test install
 
 script: ./test --scripted
diff --git a/Gopkg.lock b/Gopkg.lock
index eb1d34d..307a13e 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -256,18 +256,6 @@
   revision = "a0458a2b35708eef59eb5f620ceb3cd1c01a824d"
   version = "v1.3.3"
 
-[[projects]]
-  branch = "master"
-  digest = "1:84327234b97774e54e58c5ce6a7a82b242b38bd2ff0a4c3358891c1f19df54db"
-  name = "golang.org/x/crypto"
-  packages = [
-    "blake2b",
-    "blake2s",
-    "sha3",
-  ]
-  pruneopts = "UT"
-  revision = "4def268fd1a49955bfb3dda92fe3db4f924f2285"
-
 [[projects]]
   branch = "master"
   digest = "1:e0efd295a10a5703f556a97b7f90f9b3a02ee5080b26ee5374d100a6131aea68"
@@ -281,10 +269,9 @@
 
 [[projects]]
   branch = "master"
-  digest = "1:6c97b4baa9cf774b42192e23632afc7dee7b899d4a3dc98057d24708ce1f60ac"
+  digest = "1:d52ccbb025caf0a2166e0204ed934567b8d0dfdd23a09d947f1f040708888a0a"
   name = "golang.org/x/sys"
   packages = [
-    "cpu",
     "unix",
     "windows",
   ]
@@ -329,9 +316,6 @@
     "github.com/tidwall/gjson",
     "github.com/tidwall/sjson",
     "go.etcd.io/bbolt",
-    "golang.org/x/crypto/blake2b",
-    "golang.org/x/crypto/blake2s",
-    "golang.org/x/crypto/sha3",
     "golang.org/x/sys/windows",
   ]
   solver-name = "gps-cdcl"
diff --git a/Gopkg.toml b/Gopkg.toml
index 0e9be2a..e5fae40 100644
--- a/Gopkg.toml
+++ b/Gopkg.toml
@@ -73,10 +73,6 @@
   name = "go.etcd.io/bbolt"
   version = "1.3.2"
 
-[[constraint]]
-  branch = "master"
-  name = "golang.org/x/crypto"
-
 [[constraint]]
   branch = "master"
   name = "golang.org/x/sys"
diff --git a/test b/test
index 72f00b4..67fdac5 100755
--- a/test
+++ b/test
@@ -123,6 +123,7 @@ if [[ $install -eq 1 ]]; then
     echo "$ go get -u github.com/golangci/golangci-lint/cmd/golangci-lint"
     go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
   fi
+  exit 0
 fi
 
 # check dependencies