Skip to content

Commit

Permalink
Update golangci-lint to latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
bai committed Feb 15, 2021
1 parent 3a92e2c commit 14cb76a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
fail-fast: false
matrix:
go-version: [1.14.x, 1.15.x]
go-version: [1.15.x]
platform: [ubuntu-latest]

steps:
Expand All @@ -28,7 +28,7 @@ jobs:
${{ runner.os }}-go-
- name: Install dependencies
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.26.0
run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.36.0

- name: Run test suite
run: make test
Expand Down
10 changes: 5 additions & 5 deletions core/internal/consumer/kafka_zk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ func TestKafkaZkClient_watchGroupList(t *testing.T) {

func TestKafkaZkClient_resetOffsetWatchAndSend_BadPath(t *testing.T) {
mockZookeeper := helpers.MockZookeeperClient{}
mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("81234"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath"))
mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil)
mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("81234"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic
mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) // nolint:gocritic

module := fixtureKafkaZkModule()
module.Configure("test", "consumer.test")
Expand All @@ -200,7 +200,7 @@ func TestKafkaZkClient_resetOffsetWatchAndSend_BadOffset(t *testing.T) {
offsetStat := &zk.Stat{Mtime: 894859}
newWatchEventChan := make(chan zk.Event)
mockZookeeper.On("GetW", "/consumers/testgroup/offsets/testtopic/0").Return([]byte("notanumber"), offsetStat, func() <-chan zk.Event { return newWatchEventChan }(), nil)
mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil)
mockZookeeper.On("GetW", "/consumers/testgroup/owners/testtopic/0").Return([]byte("testowner"), (*zk.Stat)(nil), (<-chan zk.Event)(nil), nil) // nolint:gocritic

// This will block if a storage request is sent, as nothing is watching that channel
module.running.Add(1)
Expand All @@ -218,7 +218,7 @@ func TestKafkaZkClient_resetOffsetWatchAndSend_BadOffset(t *testing.T) {

func TestKafkaZkClient_resetPartitionListWatchAndAdd_BadPath(t *testing.T) {
mockZookeeper := helpers.MockZookeeperClient{}
mockZookeeper.On("ChildrenW", "/consumers/testgroup/offsets/testtopic").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath"))
mockZookeeper.On("ChildrenW", "/consumers/testgroup/offsets/testtopic").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic

module := fixtureKafkaZkModule()
module.Configure("test", "consumer.test")
Expand Down Expand Up @@ -252,7 +252,7 @@ func TestKafkaZkClient_resetTopicListWatchAndAdd_BadPath(t *testing.T) {

func TestKafkaZkClient_resetGroupListWatchAndAdd_BadPath(t *testing.T) {
mockZookeeper := helpers.MockZookeeperClient{}
mockZookeeper.On("ChildrenW", "/consumers").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath"))
mockZookeeper.On("ChildrenW", "/consumers").Return([]string{}, (*zk.Stat)(nil), (<-chan zk.Event)(nil), errors.New("badpath")) // nolint:gocritic

module := fixtureKafkaZkModule()
module.Configure("test", "consumer.test")
Expand Down

0 comments on commit 14cb76a

Please sign in to comment.