From d32c590ce85d6e795a0169f6f9b77b8f36ab9d3b Mon Sep 17 00:00:00 2001 From: Andrew Savinykh <658865+AndrewSav@users.noreply.github.com> Date: Tue, 17 Nov 2026 20:21:27 +0000 Subject: [PATCH] Move the test suites to bats-core sstephenson/bats is archived. The submodules now point at bats-core: bats-core v1.14.0, bats-assert v2.2.4, and bats-support at master 787ac47. bats-support's only release, v0.3.0, is the 2016 commit the old ztombol submodule already used; master adds four small fixes since. bats-core refuses a file with duplicate test names. ldap.bats had two pairs ("delivers mail to existing forward/alias"), and bats 0.4.0 ran the later body of each twice, so the john.doe checks never ran. They are now named by recipient and pass. CONTRIBUTING.md pointed at test/tests.bats and the old hardware/mailserver issues page; both now point at what exists. All 9 suites pass, 361/361, with the same per-suite counts as master. Closes #96 --- .gitmodules | 6 +++--- CONTRIBUTING.md | 4 ++-- test/bats | 2 +- test/ldap.bats | 8 ++++---- test/test_helper/bats-assert | 2 +- test/test_helper/bats-support | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitmodules b/.gitmodules index 0ed2caff..6d8ef6d4 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,9 +1,9 @@ [submodule "test/bats"] path = test/bats - url = https://github.com/sstephenson/bats + url = https://github.com/bats-core/bats-core [submodule "test/test_helper/bats-support"] path = test/test_helper/bats-support - url = https://github.com/ztombol/bats-support + url = https://github.com/bats-core/bats-support [submodule "test/test_helper/bats-assert"] path = test/test_helper/bats-assert - url = https://github.com/ztombol/bats-assert + url = https://github.com/bats-core/bats-assert diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index f4748dd9..1a3ed5e1 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -10,12 +10,12 @@ Please note we have a code of conduct, please follow it in all your interactions - Fork this repository - Create a new feature branch for a new functionality or bugfix - Code... -- Add integration tests in test/tests.bats +- Add integration tests in test/*.bats - Use `make` to build image locally and run tests - Document your improvements - Commit your changes - Push your code and open a new pull request -- Use [issues](https://github.com/hardware/mailserver/issues) for any questions +- Use [issues](https://github.com/mailserver2/mailserver/issues) for any questions ## Licensing diff --git a/test/bats b/test/bats index 03608115..eb7f42f8 160000 --- a/test/bats +++ b/test/bats @@ -1 +1 @@ -Subproject commit 03608115df2071fff4eaaff1605768c275e5f81f +Subproject commit eb7f42f8d608ac693d7a4b67474f6714ea68cfc5 diff --git a/test/ldap.bats b/test/ldap.bats index af19af83..ed6fdccb 100644 --- a/test/ldap.bats +++ b/test/ldap.bats @@ -284,25 +284,25 @@ load 'test_helper/bats-assert/load' assert_output 1 } -@test "checking smtp: delivers mail to existing forward (ldap configuration)" { +@test "checking smtp: delivers mail to existing forward to john.doe (ldap configuration)" { run docker exec mailserver_ldap /bin/sh -c "grep 'to=, orig_to=' /var/log/mail.log | grep 'status=sent' | wc -l" assert_success assert_output 1 } -@test "checking smtp: delivers mail to existing alias (ldap configuration)" { +@test "checking smtp: delivers mail to existing alias to john.doe (ldap configuration)" { run docker exec mailserver_ldap /bin/sh -c "grep 'to=, orig_to=' /var/log/mail.log | grep 'status=sent' | wc -l" assert_success assert_output 1 } -@test "checking smtp: delivers mail to existing forward (ldap configuration)" { +@test "checking smtp: delivers mail to existing forward to john.connor (ldap configuration)" { run docker exec mailserver_ldap /bin/sh -c "grep 'to=, orig_to=' /var/log/mail.log | grep 'status=sent' | wc -l" assert_success assert_output 1 } -@test "checking smtp: delivers mail to existing alias (ldap configuration)" { +@test "checking smtp: delivers mail to existing alias to john.connor (ldap configuration)" { run docker exec mailserver_ldap /bin/sh -c "grep 'to=, orig_to=' /var/log/mail.log | grep 'status=sent' | wc -l" assert_success assert_output 1 diff --git a/test/test_helper/bats-assert b/test/test_helper/bats-assert index 9f88b420..f1e9280e 160000 --- a/test/test_helper/bats-assert +++ b/test/test_helper/bats-assert @@ -1 +1 @@ -Subproject commit 9f88b4207da750093baabc4e3f41bf68f0dd3630 +Subproject commit f1e9280eaae8f86cbe278a687e6ba755bc802c1a diff --git a/test/test_helper/bats-support b/test/test_helper/bats-support index 004e7076..787ac476 160000 --- a/test/test_helper/bats-support +++ b/test/test_helper/bats-support @@ -1 +1 @@ -Subproject commit 004e707638eedd62e0481e8cdc9223ad471f12ee +Subproject commit 787ac476d4d9d04562a0e0732bf1ba8f751e67a1