@@ -217,7 +217,7 @@ func TestSMTP(t *testing.T) {
217
217
// TLS is forced but certificate used by mock server is untrusted.
218
218
name : "TLS: x509 untrusted" ,
219
219
useTLS : true ,
220
- expectedErr : "certificate is not trusted " ,
220
+ expectedErr : "tls: failed to verify certificate " ,
221
221
retryable : true ,
222
222
},
223
223
{
@@ -260,7 +260,7 @@ func TestSMTP(t *testing.T) {
260
260
},
261
261
ForceTLS : false ,
262
262
},
263
- expectedErr : "certificate is not trusted " ,
263
+ expectedErr : "tls: failed to verify certificate " ,
264
264
retryable : true ,
265
265
},
266
266
{
@@ -317,7 +317,10 @@ func TestSMTP(t *testing.T) {
317
317
CAFile : "nope.crt" ,
318
318
},
319
319
},
320
- expectedErr : "open nope.crt: no such file or directory" ,
320
+ // not using full error message here since it differs on *nix and Windows:
321
+ // *nix: no such file or directory
322
+ // Windows: The system cannot find the file specified.
323
+ expectedErr : "open nope.crt:" ,
321
324
retryable : true ,
322
325
},
323
326
{
@@ -330,7 +333,10 @@ func TestSMTP(t *testing.T) {
330
333
KeyFile : keyFile ,
331
334
},
332
335
},
333
- expectedErr : "open fixtures/nope.cert: no such file or directory" ,
336
+ // not using full error message here since it differs on *nix and Windows:
337
+ // *nix: no such file or directory
338
+ // Windows: The system cannot find the file specified.
339
+ expectedErr : "open fixtures/nope.cert:" ,
334
340
retryable : true ,
335
341
},
336
342
{
@@ -343,7 +349,10 @@ func TestSMTP(t *testing.T) {
343
349
KeyFile : "fixtures/nope.key" ,
344
350
},
345
351
},
346
- expectedErr : "open fixtures/nope.key: no such file or directory" ,
352
+ // not using full error message here since it differs on *nix and Windows:
353
+ // *nix: no such file or directory
354
+ // Windows: The system cannot find the file specified.
355
+ expectedErr : "open fixtures/nope.key:" ,
347
356
retryable : true ,
348
357
},
349
358
/**
0 commit comments