fix(sentry-admin): Do not wait for command finish to display output (#3390)

Currently sentry-admin.sh script saves the output of the command to a separate variable.
This makes the command "freeze" if it requires any input from the user (like sentry-admin.sh restore).
The change should provide the output directly to the shell.

Also changed contributing.md as it seemed outdated and updated requirements-dev.txt with the missing `cryptography` package.

Co-authored-by: Daniil Makhonia <daniil.makhonia@booking.com>
This commit is contained in:
Daniil Makhonia 2024-10-18 21:09:31 +02:00 committed by GitHub
parent f0f854c6f4
commit 8fd24d0231
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 11 additions and 5 deletions

View File

@ -1,7 +1,13 @@
## Testing
Validate changes to the setup by running the integration test:
### Running Tests with Pytest
```shell
./integration-test.sh
We use pytest for running tests. To run the tests:
1) Ensure that you are in the root directory of the project.
2) Run the following command:
```bash
pytest
```
This will automatically discover and run all test cases in the project.

View File

@ -5,3 +5,4 @@ pytest-rerunfailures>=11.0
pytest-sentry>=0.1.11
httpx>=0.25.2
beautifulsoup4>=4.7.1
cryptography>=43.0.3

View File

@ -22,8 +22,7 @@ on the host filesystem. Commands that write files should write them to the '/sen
# Actual invocation that runs the command in the container.
invocation() {
output=$($dc run -v "$VOLUME_MAPPING" --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web "$@" 2>&1)
echo "$output"
$dc run -v "$VOLUME_MAPPING" --rm -T -e SENTRY_LOG_LEVEL=CRITICAL web "$@" 2>&1
}
# Function to modify lines starting with `Usage: sentry` to say `Usage: ./sentry-admin.sh` instead.