Skip to content

Commit 27215cf

Browse files
committed
Test running belongs to CONTRIBUTING.md
1 parent 4beaf70 commit 27215cf

File tree

2 files changed

+46
-46
lines changed

2 files changed

+46
-46
lines changed

CONTRIBUTING.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,52 @@ $ make -j8 all
1616
```
1717

1818
Be aware that we are submoduling the `1.2-dev` branch of libmongoc and libbson as
19-
during the development of phongo there are occasional things we require that simply
19+
during the development of phongo there are things we require that simply
2020
are not yet in a release (or even finished) :)
2121

2222

23+
## Testing
24+
25+
The test suites expects to find `PHONGO-SERVERS.json` in the system temp directory (typically `/tmp`).
26+
This file should contain JSON object with MONGODB URIs, similar to the following template
27+
28+
```
29+
{
30+
"STANDALONE": "mongodb:\/\/192.168.112.10:2000",
31+
"STANDALONE_SSL": "mongodb:\/\/192.168.112.10:2100",
32+
"STANDALONE_AUTH": "mongodb:\/\/root:[email protected]:2200\/?authSource=admin",
33+
"STANDALONE_X509": "mongodb:\/\/C=US,ST=New York,L=New York City,O=MongoDB,OU=KernelUser,[email protected]:2300\/?authSource=$external&authMechanism=MONGODB-X509",
34+
"STANDALONE_PLAIN": "mongodb:\/\/root:[email protected]:2400\/?authSource=admin",
35+
"REPLICASET": "mongodb:\/\/192.168.112.10:3000,192.168.112.10:3001,192.168.112.10:3002\/?replicaSet=REPLICASET"
36+
}
37+
```
38+
The location of this PHONGO-SERVERS.json file can be configured by exporting
39+
`PHONGO_SERVERS` environment variable with a absolute path to the json configuration file.
40+
41+
Alternatively, we provide, and use, [Vagrant](https://www.vagrantup.com/) to spin up handful of VMs
42+
where we setup and configure MongoDB according to our needs.
43+
This is the preferred way of creating PHONGO-SERVERS.json and running the test suite.
44+
45+
46+
```
47+
$ make vm # requires vagrant (www.vagrantup.com)
48+
$ make test-bootstrap # Spins up mongod's in the virtual machines
49+
```
50+
51+
The `test-bootstrap` make target will then generate the required `PHONGO-SERVERS.json`.
52+
53+
54+
To execute the test suite:
55+
56+
```
57+
$ make test # Executes the test suite against the virtual machines
58+
```
59+
60+
The bundled [Vagrantfile](Vagrantfile) also contains few other (growing) list of VMs
61+
that can be provisioned to execute the test suite on various platforms.
62+
63+
These are automatically executed by the `make distcheck`, which will package a new PECL archive,
64+
spin up the various operating systems, install the newly packaged archive, and execute
65+
the test suite.
66+
67+

README.md

Lines changed: 0 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -37,51 +37,6 @@ which is distributed as
3737

3838
See [CONTRIBUTING.md](CONTRIBUTING.md)
3939

40-
## Testing
41-
42-
The test suites expects to find `PHONGO-SERVERS.json` in the system temp directory (typically `/tmp`).
43-
This file should contain JSON object with MONGODB URIs, similar to the following template
44-
45-
```
46-
{
47-
"STANDALONE": "mongodb:\/\/192.168.112.10:2000",
48-
"STANDALONE_SSL": "mongodb:\/\/192.168.112.10:2100",
49-
"STANDALONE_AUTH": "mongodb:\/\/root:[email protected]:2200\/?authSource=admin",
50-
"STANDALONE_X509": "mongodb:\/\/C=US,ST=New York,L=New York City,O=MongoDB,OU=KernelUser,[email protected]:2300\/?authSource=$external&authMechanism=MONGODB-X509",
51-
"STANDALONE_PLAIN": "mongodb:\/\/root:[email protected]:2400\/?authSource=admin",
52-
"REPLICASET": "mongodb:\/\/192.168.112.10:3000,192.168.112.10:3001,192.168.112.10:3002\/?replicaSet=REPLICASET"
53-
}
54-
```
55-
The location of this PHONGO-SERVERS.json file can be configured by exporting
56-
`PHONGO_SERVERS` environment variable with a absolute path to the json configuration file.
57-
58-
Alternatively, we provide, and use, [Vagrant](https://www.vagrantup.com/) to spin up handful of VMs
59-
where we setup and configure MongoDB according to our needs.
60-
This is the preferred way of creating PHONGO-SERVERS.json and running the test suite.
61-
62-
63-
```
64-
$ make vm # requires vagrant (www.vagrantup.com)
65-
$ make test-bootstrap # Spins up mongod's in the virtual machines
66-
```
67-
68-
The `test-bootstrap` make target will then generate the required `PHONGO-SERVERS.json`.
69-
70-
71-
To execute the test suite:
72-
73-
```
74-
$ make test # Executes the test suite against the virtual machines
75-
```
76-
77-
The bundled [Vagrantfile](Vagrantfile) also contains few other (growing) list of VMs
78-
that can be provisioned to execute the test suite on various platforms.
79-
80-
These are automatically executed by the `make distcheck`, which will package a new PECL archive,
81-
spin up the various operating systems, install the newly packaged archive, and execute
82-
the test suite.
83-
84-
8540
## Related projects
8641
- [Official high-level library](https://github.com/10gen-labs/mongo-php-library-prototype)
8742
- [MongoDB Transistor](https://github.com/bjori/mongo-php-transistor) Lightweight ODM using the [Persistable](http://php.net/bson\\persistable) interface

0 commit comments

Comments
 (0)