mirror of
https://github.com/wneessen/go-mail.git
synced 2024-11-09 23:42:55 +01:00
Merge branch 'main' into feature/97_fork-the-netsmtp-package-from-stdlib-into-go-mail
This commit is contained in:
commit
f782f3f4fc
3 changed files with 29 additions and 22 deletions
44
.cirrus.yml
44
.cirrus.yml
|
@ -1,28 +1,28 @@
|
||||||
# SPDX-FileCopyrightText: 2022 Winni Neessen <winni@neessen.dev>
|
# SPDX-FileCopyrightText: 2022 Winni Neessen <winni@neessen.dev>
|
||||||
#
|
#
|
||||||
# SPDX-License-Identifier: CC0-1.0
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
container:
|
freebsd_task:
|
||||||
image: golang:latest
|
name: FreeBSD
|
||||||
|
|
||||||
env:
|
matrix:
|
||||||
GOPROXY: https://proxy.golang.org
|
- name: FreeBSD 13.1
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-13-1
|
||||||
|
- name: FreeBSD 12.4
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-12-4
|
||||||
|
- name: FreeBSD 12.3
|
||||||
|
freebsd_instance:
|
||||||
|
image_family: freebsd-12-3
|
||||||
|
|
||||||
lint_task:
|
env:
|
||||||
name: GolangCI Lint
|
TEST_ALLOW_SEND: 0
|
||||||
container:
|
TEST_SKIP_SENDMAIL: 1
|
||||||
image: golangci/golangci-lint:latest
|
|
||||||
run_script: golangci-lint run -v --timeout 5m0s --out-format json > lint-report.json
|
|
||||||
always:
|
|
||||||
golangci_artifacts:
|
|
||||||
path: lint-report.json
|
|
||||||
type: text/json
|
|
||||||
format: golangci
|
|
||||||
|
|
||||||
build_task:
|
pkginstall_script:
|
||||||
modules_cache:
|
- pkg update -f
|
||||||
fingerprint_script: cat go.sum
|
- pkg install -y go
|
||||||
folder: $GOPATH/pkg/mod
|
|
||||||
get_script: go get github.com/wneessen/go-mail
|
test_script:
|
||||||
build_script: go build github.com/wneessen/go-mail
|
- go test -v -race -cover -shuffle=on ./...
|
||||||
test_script: go test -race -v -cover github.com/wneessen/go-mail/...
|
|
|
@ -1087,6 +1087,7 @@ func getTestConnection(auth bool) (*Client, error) {
|
||||||
if th == "" {
|
if th == "" {
|
||||||
return nil, fmt.Errorf("no TEST_HOST set")
|
return nil, fmt.Errorf("no TEST_HOST set")
|
||||||
}
|
}
|
||||||
|
fmt.Printf("XXX: TEST_HOST: %s\n", th)
|
||||||
tp := 25
|
tp := 25
|
||||||
if tps := os.Getenv("TEST_PORT"); tps != "" {
|
if tps := os.Getenv("TEST_PORT"); tps != "" {
|
||||||
tpi, err := strconv.Atoi(tps)
|
tpi, err := strconv.Atoi(tps)
|
||||||
|
|
|
@ -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