Skip to content

Commit

Permalink
refactor: Fix linter issue
Browse files Browse the repository at this point in the history
Fix shadowed variable notificationEvent to not to raise linter error.
  • Loading branch information
litleleprikon authored and beevee committed Oct 3, 2019
1 parent 2cd5795 commit 7ae57ec
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions database/redis/notification_event_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,8 @@ func TestNotificationEventErrorConnection(t *testing.T) {
dataBase.flush()
defer dataBase.flush()

var notificationEvent = moira.NotificationEvent{
// TODO(litleleprikon): check why notification is event created here again
var newNotificationEvent = moira.NotificationEvent{
Timestamp: time.Now().Unix(),
State: moira.StateNODATA,
OldState: moira.StateNODATA,
Expand All @@ -191,7 +192,7 @@ func TestNotificationEventErrorConnection(t *testing.T) {
So(actual1, ShouldBeNil)
So(err, ShouldNotBeNil)

err = dataBase.PushNotificationEvent(&notificationEvent, true)
err = dataBase.PushNotificationEvent(&newNotificationEvent, true)
So(err, ShouldNotBeNil)

total := dataBase.GetNotificationEventCount("123", 0)
Expand Down

0 comments on commit 7ae57ec

Please sign in to comment.