1
0
mirror of https://github.com/axllent/mailpit.git synced 2025-08-13 20:04:49 +02:00

Testing: Add tests for message compression levels

This commit is contained in:
Ralph Slooten
2025-03-01 14:53:36 +13:00
parent 876d0eb5da
commit 784e3de8a1

View File

@@ -79,9 +79,13 @@ func TestMimeEmailInserts(t *testing.T) {
}
func TestRetrieveMimeEmail(t *testing.T) {
compressionLevels := []int{0, 1, 2, 3}
for _, compressionLevel := range compressionLevels {
t.Logf("Testing compression level: %d", compressionLevel)
for _, tenantID := range []string{"", "MyServer 3", "host.example.com"} {
tenantID = config.DBTenantID(tenantID)
config.Compression = compressionLevel
setup(tenantID)
if tenantID == "" {
@@ -131,6 +135,10 @@ func TestRetrieveMimeEmail(t *testing.T) {
}
}
// reset compression
config.Compression = 1
}
func TestMessageSummary(t *testing.T) {
for _, tenantID := range []string{"", "MyServer 3", "host.example.com"} {
tenantID = config.DBTenantID(tenantID)