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(fixtures): support fixtures on macOS #200

Merged
merged 2 commits into from
Dec 10, 2023

Conversation

DDtKey
Copy link
Contributor

@DDtKey DDtKey commented Dec 9, 2023

Description

Change fixtures to support macos as well as linux

Motivation and Context

  • sleep doesn't work with time-units (e.g sleep 1s)
  • there is no fallocate (dd if=/dev/random of=normalfile count=10000 bs=1024 status=none used)
  • string formatting with substitution works incorrectly "$(curl -s -H "Authorization: $auth_token" localhost:8000/list | grep -o 'file_name' | wc -l)" returns " 3", so it's not equal to "3"

How Has This Been Tested?

Fixtures works on macOS and should pass CI (on lunux)

Changelog Entry

### Changed

- Support fixtures on macOS

Types of Changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other - Testing framework

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have formatted the code with rustfmt.
  • I checked the lints with clippy.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@DDtKey DDtKey requested a review from orhun as a code owner December 9, 2023 23:24
@DDtKey DDtKey changed the title test: support fixtures for macOS test: support fixtures on macOS Dec 9, 2023
@DDtKey
Copy link
Contributor Author

DDtKey commented Dec 10, 2023

Though it might be broken anytime without CI, so if it makes sense I can add a matrix with OS

Probably it's not a desired approach to time fixtures, taking other platforms into account

@codecov-commenter
Copy link

codecov-commenter commented Dec 10, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (3e34206) 70.23% compared to head (de8286e) 70.23%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #200   +/-   ##
=======================================
  Coverage   70.23%   70.23%           
=======================================
  Files          11       11           
  Lines         598      598           
=======================================
  Hits          420      420           
  Misses        178      178           
Flag Coverage Δ
unit-tests 70.23% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@orhun
Copy link
Owner

orhun commented Dec 10, 2023

Yeah, I think it is a good idea to add a matrix here:

Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Let's just add a comment there 🐻

fixtures/test-server-payload-limit/test.sh Outdated Show resolved Hide resolved
Co-authored-by: Orhun Parmaksız <[email protected]>
Copy link
Owner

@orhun orhun left a comment

Choose a reason for hiding this comment

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

Thanks for your contribution!

@orhun orhun changed the title test: support fixtures on macOS test(fixtures): support fixtures on macOS Dec 10, 2023
@orhun orhun merged commit adbd67a into orhun:master Dec 10, 2023
7 of 8 checks passed
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.

3 participants