Inject E2E DB connection info with environent variable#403
Merged
josecelano merged 1 commit intotorrust:developfrom Nov 22, 2023
Merged
Conversation
```
TORRUST_INDEX_E2E_SHARED=true \
TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.mysql.toml" \
TORRUST_INDEX_E2E_DB_CONNECT_URL="mysql://root:root_secret_password@localhost:3306/torrust_index_e2e_testing" \
cargo test \
|| exit 1
```
Th new `TORRUST_INDEX_E2E_DB_CONNECT_URL` is used to connect to the E2E
DB directly. IT's needed for some tests to setthe initial state needed
for the test, when it's not possible do do it otherwise.
Member
Author
|
ACK 1b33145 |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #403 +/- ##
========================================
Coverage 42.27% 42.27%
========================================
Files 80 80
Lines 4887 4887
========================================
Hits 2066 2066
Misses 2821 2821 ☔ View full report in Codecov by Sentry. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
How to run E2E tests example:
TORRUST_INDEX_E2E_SHARED=true \ TORRUST_INDEX_E2E_PATH_CONFIG="./share/default/config/index.e2e.container.mysql.toml" \ TORRUST_INDEX_E2E_DB_CONNECT_URL="mysql://root:root_secret_password@localhost:3306/torrust_index_e2e_testing" \ cargo test \ || exit 1The new
TORRUST_INDEX_E2E_DB_CONNECT_URLis used to connect to the E2E DB directly. IT's needed for some tests to set the initial state needed for the test, when it's not possible do do it otherwise.