Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Revert "fix tests" #990

Merged
merged 4 commits into from
Aug 15, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ jobs:
build:
working_directory: /go/src/github.com/grafana/metrictank
docker:
- image: circleci/golang:1.10
- image: circleci/golang:1.10.3
steps:
- checkout
- run: scripts/build.sh
Expand Down
11 changes: 5 additions & 6 deletions cluster/mock.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,11 @@ func NewMockNode(isLocal bool, name string, postResponse []byte) *MockNode {
}

type MockClusterManager struct {
Peers []*MockNode
membersForQuery []*MockNode
thisNode int
isPrimary bool
isReady bool
partitions []int32
Peers []*MockNode
thisNode int
isPrimary bool
isReady bool
partitions []int32
}

func (c *MockClusterManager) MemberList() []Node {
Expand Down
32 changes: 15 additions & 17 deletions scripts/qa/unused.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,30 +3,28 @@
DIR=$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )
# and cd into root project dir
cd ${DIR}/../..
#which unused &>/dev/null || go get -u honnef.co/go/tools/...
#which varcheck &>/dev/null || go get github.com/opennota/check/cmd/varcheck
#which structcheck &>/dev/null || go get github.com/opennota/check/cmd/structcheck
which unused &>/dev/null || go get honnef.co/go/tools/cmd/unused
which varcheck &>/dev/null || go get github.com/opennota/check/cmd/varcheck
which structcheck &>/dev/null || go get github.com/opennota/check/cmd/structcheck
# for https://github.com/remyoudompheng/go-misc/pull/14
which deadcode &>/dev/null || go get -u github.com/Dieterbe/go-misc/deadcode

ret=0

# temporarily commented becaused the repo of "unused" is broken. uncomment once it is fixed
#echo "## running unused"
#unused .
#r=$?
#[ $r -gt $ret ] && ret=$r
echo "## running unused"
unused .
r=$?
[ $r -gt $ret ] && ret=$r

# temporarily commented because a commit on the 31th of July also broke those two
#echo "## running varcheck"
#varcheck
#r=$?
#[ $r -gt $ret ] && ret=$r
echo "## running varcheck"
varcheck ./...
r=$?
[ $r -gt $ret ] && ret=$r

#echo "## running structcheck"
#structcheck
#r=$?
#[ $r -gt $ret ] && ret=$r
echo "## running structcheck"
structcheck ./...
r=$?
[ $r -gt $ret ] && ret=$r

echo "## running deadcode"
deadcode -test $(find . -type d | grep -v '.git' | grep -v vendor | grep -v docker)
Expand Down