Skip to content

Commit

Permalink
refactor: Rename files
Browse files Browse the repository at this point in the history
Rename `init.go` files to `sender.go`, because files no more contain Init method.
  • Loading branch information
Dimedrolity committed Nov 11, 2022
1 parent 25906ed commit b56416b
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 3 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
package telegram
package telegram_test

import (
"fmt"
"testing"
"time"

logging "github.com/moira-alert/moira/logging/zerolog_adapter"
"github.com/moira-alert/moira/senders/telegram"
. "github.com/smartystreets/goconvey/convey"
)

Expand All @@ -14,7 +15,7 @@ func TestNewSender(t *testing.T) {
location, _ := time.LoadLocation("UTC")
Convey("Init tests", t, func() {
Convey("Empty map", func() {
sender, err := NewSender(map[string]string{}, logger, nil, nil)
sender, err := telegram.NewSender(map[string]string{}, logger, nil, nil)
So(err, ShouldResemble, fmt.Errorf("can not read telegram api_token from config"))
So(sender, ShouldBeNil)
})
Expand All @@ -24,7 +25,7 @@ func TestNewSender(t *testing.T) {
"api_token": "123",
"front_uri": "http://moira.uri",
}
sender, err := NewSender(senderSettings, logger, location, nil)
sender, err := telegram.NewSender(senderSettings, logger, location, nil)
So(sender, ShouldBeNil)
So(err, ShouldNotBeNil)
})
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit b56416b

Please sign in to comment.