Skip to content

Commit 83e565e

Browse files
committed
[ci skip] Migrate tests READMEs to Markdown
1 parent 340da47 commit 83e565e

File tree

10 files changed

+203
-154
lines changed

10 files changed

+203
-154
lines changed

ext/imap/tests/README

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

ext/imap/tests/README.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# The imap extension tests
2+
3+
Many of the tests in this directory require a mail server to be running, if
4+
there is no mail server the test will skip and warn, see skipif.inc for details.
5+
6+
To make the tests run parameters in the `skipif.inc` and `imap_include.inc`
7+
files will need to be changed to match the local mailserver configuration.
8+
9+
The tests have been checked using dovecot (on Linux 32 and 64 bit systems) and
10+
hMailServer on Windows. The tests are intended to be mailserver agnostic.
11+
12+
The tests can be run without modification with a fairly minimal dovecot
13+
installation. For information, the dovecot.conf file used in running the tests
14+
is given below. The dovecot password file (dovecotpass) requires a password for
15+
one user, `webmaster@something.com`. It's also necessary to set up one
16+
additional user ID (vmail) to own the mail directory.
17+
18+
```txt
19+
protocols = imap imaps
20+
21+
listen = *
22+
23+
ssl_disable = yes
24+
25+
disable_plaintext_auth=yes
26+
27+
## Mailbox locations and namespaces
28+
29+
mail_location = maildir:/home/vmail/mail/%d/%n/Maildir
30+
31+
auth_verbose = yes
32+
33+
auth_debug = yes
34+
35+
auth default {
36+
mechanisms = login
37+
38+
passdb passwd-file {
39+
args = /etc/dovecot/dovecotpass
40+
}
41+
42+
userdb static {
43+
args = uid=11459 gid=1002 home=/home/vmail/dovecot/mail/%d/%n
44+
}
45+
46+
user = root
47+
}
48+
```

ext/imap/tests/imap_include.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ $mandatory_overview_fields = array(
3131
*
3232
* Special handling for 'udate', which will vary run-to-run; assumes an IMAP
3333
* server with its clock synced to the current system, which is consistent with
34-
* setup instructions in ext/imap/tests/README
34+
* setup instructions in ext/imap/tests/README.md
3535
*
3636
* @param array resp element from the return value of imap_fetch_overview()
3737
*/

ext/ldap/tests/README renamed to ext/ldap/tests/README.md

Lines changed: 51 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1+
# The ldap extension tests
2+
13
To ease testing LDAP-Setups we've created a vagrant-setup.
24

3-
Prerequisits:
4-
=============
5+
## Prerequisites
56

6-
You will need vagrant on your box. Get it from https://www.vagrantup.com
7+
You will need [vagrant](https://www.vagrantup.com) on your box.
78

8-
Usage:
9-
======
9+
## Usage
1010

1111
To use it follow these steps:
1212

13-
* Create a Vagrant-file with the following content.
13+
* Create a `Vagrantfile` with the following content.
1414
* Go to that directory and run "vagrant up"
1515

16-
```
16+
```Vagrantfile
1717
$setup = <<<SETUP
1818
apt-get update
1919
@@ -50,42 +50,55 @@ Vagrant.configure(2) do |config|
5050
end
5151
```
5252

53-
Now you will have a virtual machine up and running on IP-Address 192.168.10.33 listening on port 369 for incomming LDAP-connections. The machine is already configured to execute the LDAP-Tests
53+
Now you will have a virtual machine up and running on IP-Address `192.168.10.33`
54+
listening on port 369 for incomming LDAP-connections. The machine is already
55+
configured to execute the LDAP-Tests.
5456

55-
The next step is to go into the PHP-Source-directory. Configure and make the source as appropriate.
57+
The next step is to go into the PHP-Source-directory. Configure and make the
58+
source as appropriate.
5659

5760
Before running the LDAP-Tests you need to set some environment-variables:
5861

62+
```bash
5963
export LDAP_TEST_PASSWD="password"
6064
export LDAP_TEST_BASE="ou=extldap,dc=nodomain"
6165
export LDAP_TEST_USER="dc=admin,dc=nodomain"
6266
export LDAP_TEST_HOST=192.168.33.10
67+
```
6368

64-
Now you can run the test-suite by calling "make test". To test only the LDAP-Tests, run "make test TESTS=ext/ldap"
69+
Now you can run the test-suite by calling `make test`. To test only the
70+
LDAP-Tests, run `make test TESTS=ext/ldap`.
6571

6672
CAVEAT: The current setup does not (yet) test secure connections.
6773

74+
## Old README
6875

69-
========
70-
OLD README
76+
Most tests here rely on the availability of an LDAP server configured with TLS.
7177

72-
Most tests here relies on the availability of an LDAP server configured with TLS.
78+
### Client/Server configuration
7379

74-
Client/Server configuration:
75-
===========================================================
7680
OpenLDAP 2.4.31 has been used with the configuration below.
7781

7882
Notes:
79-
1. A self signed certificate can be generated using:
80-
$ openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
81-
It is used for testing ldap_start_tls(), which also requires "TLS_REQCERT never" in client configuration
82-
2. An empty LDAP structure is required for the tests to be PASSed (except for base and admin)
8383

84-
If you use a debian based distribution, prefer the use of dpkg-reconfigure.
84+
1. A self signed certificate can be generated using:
85+
86+
```bash
87+
openssl req -newkey rsa:1024 -x509 -nodes -out server.pem -keyout server.pem -days 3650
88+
```
89+
90+
It is used for testing ldap_start_tls(), which also requires
91+
`TLS_REQCERT never` in client configuration.
92+
93+
2. An empty LDAP structure is required for the tests to be PASSed (except for
94+
base and admin)
95+
96+
If you use a debian based distribution, prefer the use of `dpkg-reconfigure`.
8597
Otherwise you may alter these configuration files:
8698

87-
(/etc/openldap/)slapd.conf:
88-
-----------------------------------------------------------
99+
#### (/etc/openldap/)slapd.conf
100+
101+
```txt
89102
TLSCACertificateFile /etc/openldap/ssl/server.pem
90103
TLSCertificateFile /etc/openldap/ssl/server.pem
91104
TLSCertificateKeyFile /etc/openldap/ssl/server.pem
@@ -101,17 +114,21 @@ directory /var/lib/openldap-data
101114
index objectClass eq
102115
103116
authz-regexp
104-
uid=Manager,cn=digest-md5,cn=auth
105-
cn=Manager,dc=my-domain,dc=com
117+
uid=Manager,cn=digest-md5,cn=auth
118+
cn=Manager,dc=my-domain,dc=com
119+
```
106120

121+
#### (/etc/openldap/)ldap.conf
107122

108-
(/etc/openldap/)ldap.conf:
109-
-----------------------------------------------------------
123+
```txt
110124
TLS_REQCERT never
125+
```
126+
127+
#### Tests configuration
111128

112-
Tests configuration:
113-
===========================================================
114129
The following environment variables may be defined:
130+
131+
```txt
115132
LDAP_TEST_HOST (default: localhost) Host to connect to
116133
LDAP_TEST_PORT (default: 389) Port to connect to
117134
LDAP_TEST_BASE (default: dc=my-domain,dc=com) Base to use. May be the ldap root or a subtree. (ldap_search_variation6 will fail if a subtree is used)
@@ -120,9 +137,10 @@ LDAP_TEST_SASL_USER (default: Manager) SASL user used for SA
120137
LDAP_TEST_PASSWD (default: secret) Password used for plain and SASL binding
121138
LDAP_TEST_OPT_PROTOCOL_VERSION (default: 3) Version of LDAP protocol to use
122139
LDAP_TEST_SKIP_BIND_FAILURE (default: true) Whether to fail the test or not in case binding fails
140+
```
141+
142+
## Credits
123143
124-
Credits:
125-
===========================================================
126-
Davide Mendolia <idaf1er@gmail.com>
127-
Patrick Allaert <patrick.allaert@gmail.com>
128-
Côme Bernigaud <mcmic@php.net>
144+
* Davide Mendolia (idaf1er@gmail.com)
145+
* Patrick Allaert (patrick.allaert@gmail.com)
146+
* Côme Bernigaud (mcmic@php.net)

ext/pdo_mysql/tests/README

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

ext/pdo_mysql/tests/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# The pdo_mysql extension tests
2+
3+
You must set the following environment variables to run the tests:
4+
5+
```bash
6+
# DSN; For example: mysql:dbname=test;host=localhost;port=3306
7+
PDO_MYSQL_TEST_DSN
8+
9+
# Database host
10+
PDO_MYSQL_TEST_HOST
11+
12+
# Database (schema) name
13+
PDO_MYSQL_TEST_DB
14+
15+
# Database server socket
16+
PDO_MYSQL_TEST_SOCKET
17+
18+
# Storage engine to use
19+
PDO_MYSQL_TEST_ENGINE
20+
21+
# Database user
22+
PDO_MYSQL_TEST_USER
23+
24+
# Database user password
25+
PDO_MYSQL_TEST_PASS
26+
27+
# Database charset
28+
PDO_MYSQL_TEST_CHARSET
29+
```
30+
31+
NOTE: if any of `PDO_MYSQL_TEST_[HOST|DB|SOCKET|ENGINE|CHARSET]` is part of
32+
`PDO_MYSQL_TEST_DSN`, the values must match. That is, for example, for
33+
`PDO_MYSQL_TEST_DSN = mysql:dbname=test` you MUST set `PDO_MYSQL_TEST_DB=test`.

ext/pgsql/tests/README

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

ext/pgsql/tests/README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# The pgsql extension tests
2+
3+
Test scripts assumes:
4+
5+
* PostgreSQL server is installed locally
6+
* There is a PostgreSQL account for the users running the test scripts
7+
* There is database named `test`
8+
9+
For instance, if your login name is `testuser`, you should have PostgreSQL user
10+
account named `testuser` and grant that user access to the database `test`.
11+
12+
If you have account and database, type `createdb test` from command prompt to
13+
create the database to execute the test scripts. By executing the above command
14+
as the same user running the tests you ensure that the user is granted access to
15+
the database.
16+
17+
If you find problems in PostgreSQL extension, please report a
18+
[bug](https://bugs.php.net).

ext/snmp/tests/README

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

0 commit comments

Comments
 (0)