-
Notifications
You must be signed in to change notification settings - Fork 471
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
tests: Change truncate to dd for mac amd tests #5256
Conversation
@@ -22,7 +22,7 @@ CONST_FALSE="false" | |||
|
|||
# First, try to send an extremely large "transaction" in the request body. | |||
# This should fail with a 413 error. | |||
truncate -s 11MB "${TEMPDIR}/toolarge.tx" | |||
dd if=/dev/zero of=${TEMPDIR}/toolarge.tx bs=1M count=11 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
bs=11M count=1?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed in 8531284
@@ -22,7 +22,7 @@ CONST_FALSE="false" | |||
|
|||
# First, try to send an extremely large "transaction" in the request body. | |||
# This should fail with a 413 error. | |||
truncate -s 11MB "${TEMPDIR}/toolarge.tx" | |||
dd if=/dev/zero of=${TEMPDIR}/toolarge.tx bs=11M count=1 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
dd if=/dev/zero of=${TEMPDIR}/toolarge.tx bs=11M count=1 | |
dd if=/dev/zero of="${TEMPDIR}/toolarge.tx" bs=11M count=1 |
Codecov Report
@@ Coverage Diff @@
## master #5256 +/- ##
==========================================
- Coverage 53.77% 51.73% -2.05%
==========================================
Files 450 450
Lines 56201 56201
==========================================
- Hits 30224 29073 -1151
- Misses 23627 24800 +1173
+ Partials 2350 2328 -22 see 91 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Summary
This PR changes use of
truncate
todd
when create large zero-ed files. This was due to a breaking nightly build inmac_amd64
, since thetruncate
command was not available there.Also adds all simulate test artifacts to the tempdir so they can be cleaned up at the end of the test. Locally checked that test files were being cleaned up by running
./test/scripts/e2e.sh