mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-03 15:10:49 +00:00
* golangci-lint/CI: Bump versions
Fix remaining linter issues
* Specifically set AppVeyor version
* Fix the infamous typos 👀
* Add go env cmd to AppVeyor
* Add go version cmd to AppVeyor
* Specify AppVeyor image, adjust linters
* Update go get to go install due to deprecation
* Bump golangci-lint timeout time for AppVeyor
* Change NW contract to NQ
* Address nitters
* GetRandomPair -> Pair{}
* Address nits
* Address time nitterinos plus additional tweaks
* More time inception upgrades!
* Bending time and space
42 lines
867 B
Go
42 lines
867 B
Go
package smtpservice
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/thrasher-corp/gocryptotrader/communications/base"
|
|
"github.com/thrasher-corp/gocryptotrader/config"
|
|
)
|
|
|
|
var s SMTPservice
|
|
|
|
func TestSetup(t *testing.T) {
|
|
t.Parallel()
|
|
cfg := &config.Config{Communications: base.CommunicationsConfig{}}
|
|
commsCfg := cfg.GetCommunicationsConfig()
|
|
s.Setup(&commsCfg)
|
|
}
|
|
|
|
func TestConnect(t *testing.T) {
|
|
if err := s.Connect(); err != nil {
|
|
t.Error("smtpservice Connect() error", err)
|
|
}
|
|
}
|
|
|
|
func TestPushEvent(t *testing.T) {
|
|
err := s.PushEvent(base.Event{})
|
|
if err == nil {
|
|
t.Error("smtpservice PushEvent() error cannot be nil")
|
|
}
|
|
}
|
|
|
|
func TestSend(t *testing.T) {
|
|
err := s.Send("", "")
|
|
if err == nil {
|
|
t.Error("smtpservice Send() error cannot be nil")
|
|
}
|
|
err = s.Send("subject", "alertmessage")
|
|
if err == nil {
|
|
t.Error("smtpservice Send() error cannot be nil")
|
|
}
|
|
}
|