[CXX-1079] Control integration tests via environment variables Created: 11/Oct/16 Updated: 06/Feb/23 Resolved: 06/Feb/23 |
|
| Status: | Closed |
| Project: | C++ Driver |
| Component/s: | Testing |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Task | Priority: | Major - P3 |
| Reporter: | David Golden | Assignee: | Unassigned |
| Resolution: | Won't Do | Votes: | 0 |
| Labels: | bgtrack | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Epic Link: | CXX Driver Testing (Evergreen) |
| Description |
|
All integration tests assume a mongod (or mongos) on the default port. We should add environment variables for greater control:
|
| Comments |
| Comment by David Golden [ 26/Jan/17 ] |
|
This may happen anyway as part of our conversion to Evergreen testing multiple server versions with mongo orchestration. |
| Comment by David Golden [ 11/Oct/16 ] |
|
Using CTest or other mechanism to disable integration tests would be fine once we have them split out. The advantage I've found using an environment variable for the connection URI is that I can set the URI differently in different shells and then run tests against different mongods in each shell without having to reconfigure anything. It's fine to default to localhost:27017, but superseding it with an environment variable gives a lot of development flexibility. |
| Comment by Andrew Morrow (Inactive) [ 11/Oct/16 ] |
|
Maybe we should make more use of https://cmake.org/Wiki/CMake/Testing_With_CTest? Or does catch offer some more customizations that we have not explored? I'm generally not in favor of environment variables to control testing. Something declarative, file based, or command line argument driven is better. Otherwise, the same command executed in different contexts yields different results. That can quite puzzling, if you forget that you set one of these in your environment. |