@@ -47,7 +47,7 @@ var _ = Describe("notifications", func() {
4747 token := "abvsihdbau"
4848 color := notifications .ColorInt
4949 title := url .QueryEscape (notifications .GetTitle ())
50- expected := fmt .Sprintf ("discord://%s@%s?avatar=& color=0x%x&colordebug=0x0&colorerror=0x0&colorinfo=0x0&colorwarn=0x0&splitlines=Yes&title=%s&username=watchtower" , token , channel , color , title )
50+ expected := fmt .Sprintf ("discord://%s@%s?color=0x%x&colordebug=0x0&colorerror=0x0&colorinfo=0x0&colorwarn=0x0&splitlines=Yes&title=%s&username=watchtower" , token , channel , color , title )
5151 buildArgs := func (url string ) []string {
5252 return []string {
5353 "--notifications" ,
@@ -101,7 +101,7 @@ var _ = Describe("notifications", func() {
101101 host := "shoutrrr.local"
102102 title := url .QueryEscape (notifications .GetTitle ())
103103
104- expectedOutput := fmt .Sprintf ("gotify://%s/%s?disabletls=No&priority=0& title=%s" , host , token , title )
104+ expectedOutput := fmt .Sprintf ("gotify://%s/%s?title=%s" , host , token , title )
105105
106106 args := []string {
107107 "--notification-gotify-url" ,
@@ -128,7 +128,7 @@ var _ = Describe("notifications", func() {
128128 title := url .QueryEscape (notifications .GetTitle ())
129129
130130 hookURL := fmt .Sprintf ("https://outlook.office.com/webhook/%s/IncomingWebhook/%s/%s" , tokenA , tokenB , tokenC )
131- expectedOutput := fmt .Sprintf ("teams://%s/%s/%s?color=%s&host=outlook.office.com& title=%s" , tokenA , tokenB , tokenC , color , title )
131+ expectedOutput := fmt .Sprintf ("teams://%s/%s/%s?color=%s&title=%s" , tokenA , tokenB , tokenC , color , title )
132132
133133 args := []string {
134134 "--notification-msteams-hook" ,
@@ -147,10 +147,18 @@ var _ = Describe("notifications", func() {
147147 When ("converting an email service config into a shoutrrr url" , func () {
148148 It ("should set the from address in the URL" , func () {
149149 fromAddress := "[email protected] " 150- expectedOutput := buildExpectedURL ("" , "" , "" , 25 , fromAddress , "" , "None " )
150+ expectedOutput := buildExpectedURL (
"containrrrbot " ,
"secret-password " ,
"mail.containrrr.dev " ,
25 ,
fromAddress ,
"[email protected] " ,
"Plain " )
151151 args := []string {
152152 "--notification-email-from" ,
153153 fromAddress ,
154+ "--notification-email-to" ,
155+ 156+ "--notification-email-server-user" ,
157+ "containrrrbot" ,
158+ "--notification-email-server-password" ,
159+ "secret-password" ,
160+ "--notification-email-server" ,
161+ "mail.containrrr.dev" ,
154162 }
155163 testURL (builderFn , args , expectedOutput )
156164 })
@@ -159,13 +167,19 @@ var _ = Describe("notifications", func() {
159167
160168 fromAddress := "[email protected] " 161169162- expectedOutput := buildExpectedURL ("" , "" , "" , 25 , fromAddress , toAddress , "None " )
170+ expectedOutput := buildExpectedURL ("containrrrbot " , "secret-password " , "mail.containrrr.dev " , 25 , fromAddress , toAddress , "Plain " )
163171
164172 args := []string {
165173 "--notification-email-from" ,
166174 fromAddress ,
167175 "--notification-email-to" ,
168176 toAddress ,
177+ "--notification-email-server-user" ,
178+ "containrrrbot" ,
179+ "--notification-email-server-password" ,
180+ "secret-password" ,
181+ "--notification-email-server" ,
182+ "mail.containrrr.dev" ,
169183 }
170184
171185 testURL (builderFn , args , expectedOutput )
@@ -180,7 +194,7 @@ func buildExpectedURL(username string, password string, host string, port int, f
180194
181195 subject := fmt .Sprintf ("Watchtower updates on %s" , hostname )
182196
183- var template = "smtp://%s:%s@%s:%d/?auth=%s&encryption=Auto& fromaddress=%s&fromname=Watchtower&starttls=Yes& subject=%s&toaddresses=%s&usehtml=No "
197+ var template = "smtp://%s:%s@%s:%d/?auth=%s&fromaddress=%s&fromname=Watchtower&subject=%s&toaddresses=%s"
184198 return fmt .Sprintf (template ,
185199 url .QueryEscape (username ),
186200 url .QueryEscape (password ),
0 commit comments