Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test(debug-files): Add test for assemble endpoint call #2219

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

szokeasaurusrex
Copy link
Member

@szokeasaurusrex szokeasaurusrex commented Nov 6, 2024

Add an integration test for the debug-files upload command, which ensures that given a certain file, the expected initial request to the assemble endpoint is made to the Sentry server. Unlike existing tests, this test primarily does not serve to validate command output, but rather to ensure other behavior (in this case, that a specific HTTP request is made).

Also, add the assert_cmd crate as a dev dependency. The crate provides an interface which allows more fine-grained control over how an individual integration test is run compared with the trycmd crate we currently use everywhere. assert_cmd will help us write better integration tests for chunk uploading, which not only assert command output, but also ensure that the correct data is sent to the Sentry server (see #2194). We use the crate in this new test.

@szokeasaurusrex szokeasaurusrex marked this pull request as draft November 6, 2024 15:05
@szokeasaurusrex szokeasaurusrex changed the title build: Add assert_cmd as a dev dependency [WIP] Chunk upload test Nov 6, 2024
@szokeasaurusrex szokeasaurusrex changed the title [WIP] Chunk upload test test(debug-files): Add test for assemble endpoint call Nov 6, 2024
@szokeasaurusrex szokeasaurusrex marked this pull request as ready for review November 6, 2024 15:17
The [`assert_cmd`](https://docs.rs/assert_cmd/latest/assert_cmd/) crate provides an interface which allows more fine-grained control over how an individual integration test is run compared with the `trycmd` crate we currently use everywhere. `assert_cmd` will help us write better integration tests for chunk uploading, which not only assert command output, but also ensure that the correct data is sent to the Sentry server (see #2194).
Add an integration test for the `debug-files upload` command, which ensures that given a certain file, the expected initial request to the assemble endpoint is made to the Sentry server. Unlike existing tests, this test primarily does not serve to validate command output, but rather to ensure other behavior (in this case, that a specific HTTP request is made).
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/chunk-upload-test branch from 827126e to df07728 Compare November 6, 2024 16:35
Base automatically changed from szokeasaurusrex/env-set-function to master November 7, 2024 12:24
@szokeasaurusrex szokeasaurusrex force-pushed the szokeasaurusrex/chunk-upload-test branch from 2958fe3 to df07728 Compare November 7, 2024 12:26
@szokeasaurusrex szokeasaurusrex merged commit df07728 into master Nov 7, 2024
25 checks passed
@szokeasaurusrex szokeasaurusrex deleted the szokeasaurusrex/chunk-upload-test branch November 7, 2024 12:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants