From 2bde3404286584c8caf628297609869a85634203 Mon Sep 17 00:00:00 2001 From: Winni Neessen Date: Thu, 14 Nov 2024 10:45:35 +0100 Subject: [PATCH] Update SMTP test port variable and CI configuration Changed the SMTP test server base port and updated the corresponding environment variable name to `TEST_BASEPORT_SMTP`. This ensures consistency across the test setup and CI workflow configuration. --- .github/workflows/ci.yml | 4 ++++ smtp/smtp_test.go | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7de4077..8004942 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -34,6 +34,7 @@ jobs: PERFORM_UNIX_OPEN_WRITE_TESTS: ${{ vars.PERFORM_UNIX_OPEN_WRITE_TESTS }} PERFORM_SENDMAIL_TESTS: ${{ vars.PERFORM_SENDMAIL_TESTS }} TEST_BASEPORT: ${{ vars.TEST_BASEPORT }} + TEST_BASEPORT_SMTP: ${{ vars.TEST_BASEPORT_SMTP }} TEST_HOST: ${{ secrets.TEST_HOST }} TEST_USER: ${{ secrets.TEST_USER }} TEST_PASS: ${{ secrets.TEST_PASS }} @@ -129,6 +130,7 @@ jobs: go: ['1.19', '1.20', '1.21', '1.22', '1.23'] env: TEST_BASEPORT: ${{ vars.TEST_BASEPORT }} + TEST_BASEPORT_SMTP: ${{ vars.TEST_BASEPORT_SMTP }} steps: - name: Harden Runner uses: step-security/harden-runner@91182cccc01eb5e619899d80e4e971d6181294a7 # v2.10.1 @@ -154,6 +156,7 @@ jobs: osver: ['14.1', '14.0', 13.4'] env: TEST_BASEPORT: ${{ vars.TEST_BASEPORT }} + TEST_BASEPORT_SMTP: ${{ vars.TEST_BASEPORT_SMTP }} steps: - name: Checkout Code uses: actions/checkout@61b9e3751b92087fd0b06925ba6dd6314e06f089 # master @@ -195,6 +198,7 @@ jobs: env: PERFORM_ONLINE_TEST: ${{ vars.PERFORM_ONLINE_TEST }} TEST_BASEPORT: ${{ vars.TEST_BASEPORT }} + TEST_BASEPORT_SMTP: ${{ vars.TEST_BASEPORT_SMTP }} TEST_HOST: ${{ secrets.TEST_HOST }} TEST_USER: ${{ secrets.TEST_USER }} TEST_PASS: ${{ secrets.TEST_PASS }} diff --git a/smtp/smtp_test.go b/smtp/smtp_test.go index 764d65b..471b1e1 100644 --- a/smtp/smtp_test.go +++ b/smtp/smtp_test.go @@ -53,7 +53,7 @@ const ( var PortAdder atomic.Int32 // TestServerPortBase is the base port for the simple SMTP test server -var TestServerPortBase int32 = 30025 +var TestServerPortBase int32 = 20025 // localhostCert is a PEM-encoded TLS cert generated from src/crypto/tls: // @@ -234,7 +234,7 @@ var authTests = []authTest{ } func init() { - testPort := os.Getenv("TEST_BASEPORT") + testPort := os.Getenv("TEST_BASEPORT_SMTP") if testPort == "" { return }