You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export OS_RESIZE_FLAVOR=2 #Must be a valid flavor ID
226
+
export OS_FLAVOR=1 #Must be a valid flavor ID
227
+
export OS_DOMAIN_ID="default"
228
+
```
229
+
230
+
To export environment variables, run
231
+
```bash
232
+
$ . env_test.sh
233
+
```
234
+
235
+
Additionally, integration tests require image called `cirros` exists.
236
+
209
237
### Running integration tests
210
238
211
239
You interact with integration tests through a runner script:
212
240
213
241
```bash
214
-
php ./integration/Runner.php
242
+
php ./tests/integration/run.php
215
243
```
216
244
217
245
It supports these command-line flags:
218
246
219
247
| Flag | Description | Example |
220
248
| ---- | ----------- | ------- |
221
-
|`-s``--service`| Allows you to refine tests by a particular service. A service corresponds to top-level directories in the `./integration` directory, meaning that `compute` and `identity` are services because they exist as sub-directories there. If omitted, all services are run.|Run compute service: `php ./integration/Runner.php -s compute` Run all tests: `php ./integration/Runner.php`|
222
-
|`-v``--version`| Allows you to refine by a particular service version. A version corresponds to the sub-directories inside a service directory, meaning that `v2` is a supported version of `compute` because it exists as a sub-directory inside the `compute` directory. If omitted, all versions are run.|Run v2 Compute tests: `php ./integration/Runner.php -s compute -v v2` Run all compute tests: `php ./integration/Runner.php -s compute`|
223
-
|`-t``--test`| Allows you to refine by a particular test. Tests are defined in classes like `integration\OpenStack\Compute\v2`. Each test method manually references a sample file. To refine which tests are run, list the name of the method in this class. If omitted, all tests are run.|Run create server test: `php ./integration/Runner.php -s compute -v v2 -t createServer` Run all compute v2 tests: `php ./integration/Runner.php -s compute -v v2`|
249
+
|`-s``--service`| Allows you to refine tests by a particular service. A service corresponds to top-level directories in the `./integration` directory, meaning that `compute` and `identity` are services because they exist as sub-directories there. If omitted, all services are run.|Run compute service: `php ./tests/integration/run.php -s compute` Run all tests: `php ./tests/integration/run.php`|
250
+
|`-v``--version`| Allows you to refine by a particular service version. A version corresponds to the sub-directories inside a service directory, meaning that `v2` is a supported version of `compute` because it exists as a sub-directory inside the `compute` directory. If omitted, all versions are run.|Run v2 Compute tests: `php ./tests/integration/run.php -s compute -v v2` Run all compute tests: `php ./tests/integration/run.php -s compute`|
251
+
|`-t``--test`| Allows you to refine by a particular test. Tests are defined in classes like `integration\OpenStack\Compute\v2`. Each test method manually references a sample file. To refine which tests are run, list the name of the method in this class. If omitted, all tests are run.|Run create server test: `php ./tests/integration/run.php -s compute -v v2 -t createServer` Run all compute v2 tests: `php ./tests/integration/run.php -s compute -v v2`|
224
252
|`--debug`|||
225
-
| `--help` | A help screen is returned and no tests run | `php ./integration/Runner.php --help`
253
+
| `--help` | A help screen is returned and no tests run | `php ./tests/integration/run.php --help`
0 commit comments