mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-22 13:50:49 +01:00
#98 Set up FreeBSD tests via CirrusCI
Cirrus seems to kill the sendmail test, let's make it skip-able
This commit is contained in:
parent
433980a584
commit
64dde76a58
2 changed files with 7 additions and 0 deletions
|
@ -18,6 +18,7 @@ freebsd_task:
|
|||
|
||||
env:
|
||||
TEST_ALLOW_SEND: 0
|
||||
TEST_SKIP_SENDMAIL: 1
|
||||
|
||||
pkginstall_script:
|
||||
- pkg update -f
|
||||
|
|
|
@ -16,6 +16,9 @@ import (
|
|||
|
||||
// TestMsg_WriteToSendmailWithContext tests the WriteToSendmailWithContext() method of the Msg
|
||||
func TestMsg_WriteToSendmailWithContext(t *testing.T) {
|
||||
if os.Getenv("TEST_SKIP_SENDMAIL") != "" {
|
||||
t.Skipf("TEST_SKIP_SENDMAIL variable is set. Skipping sendmail test")
|
||||
}
|
||||
tests := []struct {
|
||||
name string
|
||||
sp string
|
||||
|
@ -42,6 +45,9 @@ func TestMsg_WriteToSendmailWithContext(t *testing.T) {
|
|||
|
||||
// TestMsg_WriteToSendmail will test the output to the local sendmail command
|
||||
func TestMsg_WriteToSendmail(t *testing.T) {
|
||||
if os.Getenv("TEST_SKIP_SENDMAIL") != "" {
|
||||
t.Skipf("TEST_SKIP_SENDMAIL variable is set. Skipping sendmail test")
|
||||
}
|
||||
_, err := os.Stat(SendmailPath)
|
||||
if err != nil {
|
||||
t.Skipf("local sendmail command not found in expected path. Skipping")
|
||||
|
|
Loading…
Reference in a new issue