@@ -60,10 +60,8 @@ func TestAddSMTP(t *testing.T) {
6060 Auth : "PLAIN" ,
6161 Host : "localhost" ,
6262 Port : 25 ,
63- // ForceSMTPS: true,
64- // SkipVerify: true,
6563 },
66- TwoFactorPolicy : "skip " ,
64+ TwoFactorPolicy : "" ,
6765 },
6866 },
6967 {
@@ -73,12 +71,12 @@ func TestAddSMTP(t *testing.T) {
7371 "--host" , "localhost" ,
7472 "--port" , "25" ,
7573 "--auth-type" , "LOGIN" ,
76- "--force-smtps=false " ,
77- "--skip-verify=false " ,
74+ "--force-smtps" ,
75+ "--skip-verify" ,
7876 "--helo-hostname" , "example.com" ,
79- "--disable-helo=false " ,
77+ "--disable-helo=true " ,
8078 "--allowed-domains" , "example.com,example.org" ,
81- "--skip-local-2fa=false " ,
79+ "--skip-local-2fa" ,
8280 "--active=false" ,
8381 },
8482 source : & auth_model.Source {
@@ -89,13 +87,13 @@ func TestAddSMTP(t *testing.T) {
8987 Auth : "LOGIN" ,
9088 Host : "localhost" ,
9189 Port : 25 ,
92- ForceSMTPS : false ,
93- SkipVerify : false ,
90+ ForceSMTPS : true ,
91+ SkipVerify : true ,
9492 HeloHostname : "example.com" ,
95- DisableHelo : false ,
93+ DisableHelo : true ,
9694 AllowedDomains : "example.com,example.org" ,
9795 },
98- TwoFactorPolicy : "" ,
96+ TwoFactorPolicy : "skip " ,
9997 },
10098 },
10199 }
@@ -157,13 +155,10 @@ func TestUpdateSMTP(t *testing.T) {
157155 Name : "old name" ,
158156 IsActive : true ,
159157 Cfg : & smtp.Source {
160- Auth : "PLAIN" ,
161- Host : "old host" ,
162- Port : 26 ,
163- ForceSMTPS : true ,
164- SkipVerify : true ,
158+ Auth : "PLAIN" ,
159+ Host : "old host" ,
160+ Port : 26 ,
165161 },
166- TwoFactorPolicy : "" ,
167162 },
168163 args : []string {
169164 "--id" , "1" ,
@@ -177,13 +172,10 @@ func TestUpdateSMTP(t *testing.T) {
177172 Name : "test" ,
178173 IsActive : true ,
179174 Cfg : & smtp.Source {
180- Auth : "PLAIN" ,
181- Host : "localhost" ,
182- Port : 25 ,
183- ForceSMTPS : true ,
184- SkipVerify : true ,
175+ Auth : "PLAIN" ,
176+ Host : "localhost" ,
177+ Port : 25 ,
185178 },
186- TwoFactorPolicy : "skip" ,
187179 },
188180 },
189181 {
@@ -197,10 +189,7 @@ func TestUpdateSMTP(t *testing.T) {
197189 Auth : "PLAIN" ,
198190 Host : "old host" ,
199191 Port : 26 ,
200- ForceSMTPS : true ,
201- SkipVerify : true ,
202192 HeloHostname : "old.example.com" ,
203- DisableHelo : false ,
204193 AllowedDomains : "old.example.com" ,
205194 },
206195 TwoFactorPolicy : "" ,
@@ -211,12 +200,12 @@ func TestUpdateSMTP(t *testing.T) {
211200 "--host" , "localhost" ,
212201 "--port" , "25" ,
213202 "--auth-type" , "LOGIN" ,
214- "--force-smtps=false " ,
215- "--skip-verify=false " ,
203+ "--force-smtps" ,
204+ "--skip-verify" ,
216205 "--helo-hostname" , "example.com" ,
217- "--disable-helo=true " ,
206+ "--disable-helo" ,
218207 "--allowed-domains" , "example.com,example.org" ,
219- "--skip-local-2fa=true " ,
208+ "--skip-local-2fa" ,
220209 "--active=false" ,
221210 },
222211 authSource : & auth_model.Source {
@@ -228,8 +217,8 @@ func TestUpdateSMTP(t *testing.T) {
228217 Auth : "LOGIN" ,
229218 Host : "localhost" ,
230219 Port : 25 ,
231- ForceSMTPS : false ,
232- SkipVerify : false ,
220+ ForceSMTPS : true ,
221+ SkipVerify : true ,
233222 HeloHostname : "example.com" ,
234223 DisableHelo : true ,
235224 AllowedDomains : "example.com,example.org" ,
@@ -252,11 +241,8 @@ func TestUpdateSMTP(t *testing.T) {
252241 Name : "test" ,
253242 IsActive : true ,
254243 Cfg : & smtp.Source {
255- Auth : "PLAIN" ,
256- SkipVerify : true ,
257- ForceSMTPS : true ,
244+ Auth : "PLAIN" ,
258245 },
259- TwoFactorPolicy : "skip" ,
260246 }, nil
261247 },
262248
0 commit comments