diff --git a/Makefile b/Makefile index 08d07ff5966..c7e1d604d7f 100644 --- a/Makefile +++ b/Makefile @@ -21,11 +21,12 @@ XGOIMAGE = statusteam/xgo:$(XGOVERSION) XGOIMAGEIOSSIM = statusteam/xgo-ios-simulator:$(XGOVERSION) networkid ?= StatusChain +e2e_extraflags = DOCKER_IMAGE_NAME ?= statusteam/status-go DOCKER_TEST_WORKDIR = /go/src/github.com/status-im/status-go/ -DOCKER_TEST_IMAGE = golang:1.9 +DOCKER_TEST_IMAGE = golang:1.9 UNIT_TEST_PACKAGES := $(shell go list ./... | grep -v /vendor | grep -v /t/e2e | grep -v /t/destructive | grep -v /cmd | grep -v /lib) @@ -130,15 +131,18 @@ test-unit-coverage: ##@tests Run unit and integration tests with coverage test-e2e: ##@tests Run e2e tests # order: reliability then alphabetical # TODO(tiabc): make a single command out of them adding `-p 1` flag. - go test -timeout 5m ./t/e2e/accounts/... -network=$(networkid) - go test -timeout 5m ./t/e2e/api/... -network=$(networkid) - go test -timeout 5m ./t/e2e/node/... -network=$(networkid) - go test -timeout 50m ./t/e2e/jail/... -network=$(networkid) - go test -timeout 20m ./t/e2e/rpc/... -network=$(networkid) - go test -timeout 20m ./t/e2e/whisper/... -network=$(networkid) - go test -timeout 10m ./t/e2e/transactions/... -network=$(networkid) + go test -timeout 5m ./t/e2e/accounts/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 5m ./t/e2e/api/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 5m ./t/e2e/node/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 50m ./t/e2e/jail/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 20m ./t/e2e/rpc/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 20m ./t/e2e/whisper/... -network=$(networkid) $(e2e_extraflags) + go test -timeout 10m ./t/e2e/transactions/... -network=$(networkid) $(e2e_extraflags) # e2e_test tag is required to include some files from ./lib without _test suffix - go test -timeout 40m -tags e2e_test ./lib -network=$(networkid) + go test -timeout 40m -tags e2e_test ./lib -network=$(networkid) $(e2e_extraflags) + +race-check: e2e_extraflags=-race ##@tests Run e2e tests with -race flag +race-check: test-e2e lint-install: go get -u github.com/alecthomas/gometalinter diff --git a/geth/params/config_test.go b/geth/params/config_test.go index 31edec9ae08..b59bcaf6527 100644 --- a/geth/params/config_test.go +++ b/geth/params/config_test.go @@ -270,7 +270,7 @@ var loadConfigTestCases = []struct { require.True(t, nodeConfig.ClusterConfig.Enabled, "cluster configuration is expected to be enabled after loading file") enodes := nodeConfig.ClusterConfig.StaticNodes - require.True(t, len(enodes) == 2) + require.Len(t, enodes, 2) }, }, { diff --git a/t/e2e/whisper/whisper_mailbox_test.go b/t/e2e/whisper/whisper_mailbox_test.go index 545acef3b1c..8cf0d6b8df9 100644 --- a/t/e2e/whisper/whisper_mailbox_test.go +++ b/t/e2e/whisper/whisper_mailbox_test.go @@ -79,11 +79,11 @@ func (s *WhisperMailboxSuite) TestRequestMessageFromMailboxAsync() { //Create message filter messageFilterID := s.createPrivateChatMessageFilter(rpcClient, keyID, topic.String()) - //Threre are no messages at filter + //There are no messages at filter messages := s.getMessagesByMessageFilterID(rpcClient, messageFilterID) s.Require().Equal(0, len(messages)) - //Post message matching with filter (key and token) + //Post message matching with filter (key and topic) s.postMessageToPrivate(rpcClient, pubkey.String(), topic.String(), hexutil.Encode([]byte("Hello world!"))) //Get message to make sure that it will come from the mailbox later