d596240099
add failure cases change interrupt behavior for fatal errors bump up timeout to 20 minutes change max file size to 2GB remove unnecessary utxo wait
20 lines
464 B
Go
20 lines
464 B
Go
package util
|
|
|
|
import (
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
func TestSendToSlack(t *testing.T) {
|
|
slackToken := os.Getenv("SLACK_TOKEN")
|
|
if slackToken == "" {
|
|
t.Error("A slack token was not provided")
|
|
}
|
|
host, err := os.Hostname()
|
|
if err != nil {
|
|
host = "ytsync-unknown"
|
|
}
|
|
InitSlack(os.Getenv("SLACK_TOKEN"), os.Getenv("SLACK_CHANNEL"), host)
|
|
SendInfoToSlack("This is a test :) Working %.2f%%", 1.01*100)
|
|
SendErrorToSlack("This is a test :) Working %.2f%%", 0.01*100)
|
|
}
|