mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-09 15:32:54 +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:
|
env:
|
||||||
TEST_ALLOW_SEND: 0
|
TEST_ALLOW_SEND: 0
|
||||||
|
TEST_SKIP_SENDMAIL: 1
|
||||||
|
|
||||||
pkginstall_script:
|
pkginstall_script:
|
||||||
- pkg update -f
|
- pkg update -f
|
||||||
|
|
|
@ -16,6 +16,9 @@ import (
|
||||||
|
|
||||||
// TestMsg_WriteToSendmailWithContext tests the WriteToSendmailWithContext() method of the Msg
|
// TestMsg_WriteToSendmailWithContext tests the WriteToSendmailWithContext() method of the Msg
|
||||||
func TestMsg_WriteToSendmailWithContext(t *testing.T) {
|
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 {
|
tests := []struct {
|
||||||
name string
|
name string
|
||||||
sp string
|
sp string
|
||||||
|
@ -42,6 +45,9 @@ func TestMsg_WriteToSendmailWithContext(t *testing.T) {
|
||||||
|
|
||||||
// TestMsg_WriteToSendmail will test the output to the local sendmail command
|
// TestMsg_WriteToSendmail will test the output to the local sendmail command
|
||||||
func TestMsg_WriteToSendmail(t *testing.T) {
|
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)
|
_, err := os.Stat(SendmailPath)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Skipf("local sendmail command not found in expected path. Skipping")
|
t.Skipf("local sendmail command not found in expected path. Skipping")
|
||||||
|
|
Loading…
Reference in a new issue