@@ -89,14 +89,15 @@ run in as many environments as possible. To paraphrase the
89
89
Consider that a well-crafted ` EXPECTF ` section may allow a ` SKIPIF ` section to
90
90
be less restrictive.
91
91
92
- ### Local Mongo Orchestration (and Travis CI )
92
+ ### Local Mongo Orchestration (and CI platforms )
93
93
94
94
The test suite depends on [ Mongo Orchestration] ( https://github.com/10gen/mongo-orchestration ) .
95
95
Mongo Orchestration is an HTTP server that provides a REST API for maintaining
96
- MongoDB configurations. These configurations are located in `` scripts/presets ``
97
- and for Travis CI in `` scripts/presets/travis `` . The presets for Travis CI can
98
- also be spun-up locally, and that is the preferred testing method. An older way
99
- using a specific VM is also still available (see further down).
96
+ MongoDB configurations. These configurations are provided by the
97
+ [ drivers-evergreen-tools] ( https://github.com/mongodb-labs/drivers-evergreen-tools )
98
+ repository. These configurations can be run locally. Alternatively, you can use
99
+ the GitHub Actions workflow if you don't want to set up a local development
100
+ environment.
100
101
101
102
Mongo Orchestration expects that the `` mongod `` (and `` mongos `` ) binaries are
102
103
available in the `` PATH `` .
@@ -107,71 +108,12 @@ Once installed, Mongo Orchestration can be started with
107
108
~/.local/bin/mongo-orchestration start --no-fork --enable-majority-read-concern
108
109
```
109
110
110
- The Travis CI setup uses
111
- [ deployments] ( https://github.com/mongodb/mongo-php-driver/blob/master/.travis.scripts/setup_mo.sh )
112
- to test different topologies. Currently, it supports `` STANDALONE `` ,
113
- `` STANDALONE_OLD `` (for MongoDB versions before 3.6), `` STANDALONE_SSL `` ,
114
- `` REPLICASET `` and `` SHARDED_CLUSTER `` .
115
-
116
111
The test suite uses the `` MONGODB_URI `` environment variable as connection
117
- string to run all tests. In order to make the URI available to the test suite,
118
- you can run the following for a "deployment" in the * root* of the MongoDB
119
- Driver GIT checkout:
120
-
121
- ```
122
- export TRAVIS_BUILD_DIR=`pwd`
123
- DEPLOYMENT=STANDALONE_AUTH .travis.scripts/setup_mo.sh
124
- export MONGODB_URI=`cat /tmp/uri.txt`
125
- ```
112
+ string to run all tests. If not set, tests assume MongoDB is listening on the
113
+ default MongoDB port (27017) on localhost.
126
114
127
115
With this set-up, the tests can be run with ` make test ` .
128
116
129
- ### VM-based Mongo Orchestration (legacy set-up)
130
-
131
- Alternative to the Travis CI set-up, our test suite also includes scripts to configure test environments
132
- with [ Vagrant] ( https://www.vagrantup.com/ ) and
133
- [ Mongo Orchestration] ( https://github.com/10gen/mongo-orchestration ) .
134
- The deployments started in this Vagrant image have hard coded URLs to be used
135
- with the `` MONGODB_URI `` environment variable:
136
-
137
- Deployment | URI
138
- --------------------------- | ---
139
- Standalone (MongoDB 4.0) | ` mongodb://192.168.112.10:2000 `
140
- Standalone (MongoDB 3.0) | ` mongodb://192.168.112.10:2700 `
141
- Standalone with SSL | ` mongodb://192.168.112.10:2100 `
142
- Standalone with Auth |
` mongodb://root:[email protected] :2200/?authSource=admin `
143
- Standalone with X509 Auth |
` mongodb://C=US,ST=New York,L=New York City,O=MongoDB,OU=KernelUser,[email protected] :2300/?authSource=$external&authMechanism=MONGODB-X509 `
144
- Standalone with Plain Auth |
` mongodb://root:[email protected] :2400/?authSource=admin `
145
- Replicaset (MongoDB 4.0) | ` mongodb://192.168.112.10:3000,192.168.112.10:3001,192.168.112.10:3002/?replicaSet=REPLICASET `
146
- Replicaset (MongoDB 3.0) | ` mongodb://192.168.112.10:3100,192.168.112.10:3101,192.168.112.10:3102/?replicaSet=REPLICASET_30 `
147
- Replicaset (MongoDB 3.6) | ` mongodb://192.168.112.10:3200,192.168.112.10:3201,192.168.112.10:3202/?replicaSet=REPLICASET_36 `
148
-
149
- The Vagrant images can be started by using:
150
-
151
- ```
152
- $ make vm # Starts the test VMs with Vagrant
153
- $ make test-bootstrap # Starts the mongod servers within the test VM
154
- ```
155
-
156
- After this set-up is completed, you need to export the ` MONGODB_URI `
157
- environment variables with one of the values from the table above. The ` test `
158
- make target may be used to execute the test suite:
159
-
160
- ```
161
- $ make test # Executes the test suite against the VMs
162
- ```
163
-
164
- To find out which VM servers are running at a later point in time, you can run
165
- ` make test-bootstrap ` to obtain a list of deployments and their URIs.
166
-
167
- #### Restarting Mongo Orchestration
168
-
169
- If something goes awry in the test VM, you can reload it by running:
170
-
171
- ```
172
- make test-bootstrap
173
- ```
174
-
175
117
## Updating libmongoc, libbson, and libmongocrypt
176
118
177
119
The PHP driver can use either system libraries or bundled versions of
0 commit comments