Skip to content

Commit

Permalink
removed notification test
Browse files Browse the repository at this point in the history
  • Loading branch information
tarunKoyalwar committed Nov 5, 2022
1 parent f7ca04e commit 66dbc69
Showing 1 changed file with 12 additions and 13 deletions.
25 changes: 12 additions & 13 deletions test/shell_test/simple_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"strings"
"testing"

"github.com/tarunKoyalwar/talosplus/pkg/alerts"
"github.com/tarunKoyalwar/talosplus/pkg/db"
"github.com/tarunKoyalwar/talosplus/pkg/shell"
"github.com/tarunKoyalwar/talosplus/pkg/stringutils"
Expand Down Expand Up @@ -85,24 +84,24 @@ func Test_CMD_Export(t *testing.T) {
}
}

func Test_Alerts(t *testing.T) {
id := os.Getenv("DISCORD_WID")
tok := os.Getenv("DISCORD_WTOKEN")
// func Test_Alerts(t *testing.T) {
// id := os.Getenv("DISCORD_WID")
// tok := os.Getenv("DISCORD_WTOKEN")

alerts.Alert = alerts.NewDiscordHook(id, tok)
// alerts.Alert = alerts.NewDiscordHook(id, tok)

alerts.Alert.Title = "Testing"
// alerts.Alert.Title = "Testing"

g := shell.NewCMDWrap("echo 'Hello Luci!!' #notify{Test Output}", "")
g.Process()
// g := shell.NewCMDWrap("echo 'Hello Luci!!' #notify{Test Output}", "")
// g.Process()

if err := g.Execute(); err != nil {
HandleErrors(err, t, "Failed to Run Command %v\n returned %v", g.Raw, err)
}
// if err := g.Execute(); err != nil {
// HandleErrors(err, t, "Failed to Run Command %v\n returned %v", g.Raw, err)
// }

// g.Export()
// // g.Export()

}
// }

func HandleErrors(er error, t *testing.T, msg string, a ...any) {
if er != nil {
Expand Down

0 comments on commit 66dbc69

Please sign in to comment.