Skip to content

Commit f62f6a6

Browse files
Follow-up to remove IMAP ext (#13248)
Fixed and optimized tests that depend on imap in standard ext tests. Also, the location of the setup script for hmailserver has changed.
1 parent 3ce7bf2 commit f62f6a6

25 files changed

+636
-1315
lines changed

.github/actions/setup-x64/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,3 @@ runs:
2323
sudo cp ext/snmp/tests/snmpd.conf /etc/snmp
2424
sudo cp ext/snmp/tests/bigtest /etc/snmp
2525
sudo service snmpd restart
26-
27-
sudo groupadd -g 5000 vmail
28-
sudo useradd -m -d /var/vmail -s /bin/false -u 5000 -g vmail vmail
29-
sudo cp ext/imap/tests/setup/dovecot.conf /etc/dovecot/dovecot.conf
30-
sudo cp ext/imap/tests/setup/dovecotpass /etc/dovecot/dovecotpass
31-
sudo service dovecot restart

.github/scripts/windows/test_task.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ rem prepare for mail
112112
curl -sLo hMailServer.exe https://www.hmailserver.com/download_file/?downloadid=271
113113
hMailServer.exe /verysilent
114114
cd %APPVEYOR_BUILD_FOLDER%
115-
%PHP_BUILD_DIR%\php.exe -dextension_dir=%PHP_BUILD_DIR% -dextension=com_dotnet appveyor\setup_hmailserver.php
115+
%PHP_BUILD_DIR%\php.exe -dextension_dir=%PHP_BUILD_DIR% -dextension=com_dotnet .github\setup_hmailserver.php
116116

117117
mkdir %PHP_BUILD_DIR%\test_file_cache
118118
rem generate php.ini
Lines changed: 25 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,25 @@
1-
<?php
2-
3-
require __DIR__ . "/../ext/imap/tests/setup/imap_include.inc";
4-
5-
$hmail = new COM("hMailServer.Application");
6-
$hmail->authenticate("Administrator", "");
7-
8-
$domain = $hmail->Domains->Add();
9-
$domain->Name = IMAP_MAIL_DOMAIN;
10-
$domain->Active = true;
11-
$domain->Save();
12-
13-
$accounts = $domain->accounts();
14-
15-
foreach (IMAP_USERS as $user) {
16-
$account = $accounts->Add();
17-
$account->Address = "$user@" . IMAP_MAIL_DOMAIN;
18-
$account->Password = IMAP_MAILBOX_PASSWORD;
19-
$account->Active = true;
20-
$account->Save();
21-
}
1+
<?php
2+
3+
/** If required change these values to make the test runs */
4+
const IMAP_MAIL_DOMAIN = 'example.com';
5+
const IMAP_MAILBOX_PASSWORD = 'p4ssw0rd';
6+
/** Tests require 4 valid userids */
7+
const IMAP_USERS = ["webmaster", "info", "admin", "foo"];
8+
9+
$hmail = new COM("hMailServer.Application");
10+
$hmail->authenticate("Administrator", "");
11+
12+
$domain = $hmail->Domains->Add();
13+
$domain->Name = IMAP_MAIL_DOMAIN;
14+
$domain->Active = true;
15+
$domain->Save();
16+
17+
$accounts = $domain->accounts();
18+
19+
foreach (IMAP_USERS as $user) {
20+
$account = $accounts->Add();
21+
$account->Address = "$user@" . IMAP_MAIL_DOMAIN;
22+
$account->Password = IMAP_MAILBOX_PASSWORD;
23+
$account->Active = true;
24+
$account->Save();
25+
}

ext/imap/tests/setup/clean.inc

Lines changed: 0 additions & 32 deletions
This file was deleted.

ext/imap/tests/setup/dovecot.conf

Lines changed: 0 additions & 47 deletions
This file was deleted.

ext/imap/tests/setup/dovecotpass

Lines changed: 0 additions & 1 deletion
This file was deleted.

ext/imap/tests/setup/imap_include.inc

Lines changed: 0 additions & 213 deletions
This file was deleted.

ext/imap/tests/setup/setup.sh

Lines changed: 0 additions & 6 deletions
This file was deleted.

ext/imap/tests/setup/skipif.inc

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)