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

tests: Change truncate to dd for mac amd tests #5256

Merged
merged 3 commits into from
Apr 5, 2023

Conversation

algochoi
Copy link
Contributor

@algochoi algochoi commented Apr 5, 2023

Summary

This PR changes use of truncate to dd when create large zero-ed files. This was due to a breaking nightly build in mac_amd64, since the truncate 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

winder
winder previously approved these changes Apr 5, 2023
@@ -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
Copy link
Contributor

@algorandskiy algorandskiy Apr 5, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

bs=11M count=1?

Copy link
Contributor Author

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
dd if=/dev/zero of=${TEMPDIR}/toolarge.tx bs=11M count=1
dd if=/dev/zero of="${TEMPDIR}/toolarge.tx" bs=11M count=1

@algochoi algochoi marked this pull request as ready for review April 5, 2023 15:54
@codecov
Copy link

codecov bot commented Apr 5, 2023

Codecov Report

Merging #5256 (e9f5ba3) into master (896015f) will decrease coverage by 2.05%.
The diff coverage is n/a.

@@            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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants