Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upfilesystem: Add free_kb, size_kb, type, and percent_free properties #3778
Conversation
clintoncwolfe
referenced this pull request
Feb 4, 2019
Closed
filesystem: Add 'type' and 'free' attributes #3767
jerryaldrichiii
approved these changes
Feb 4, 2019
Looks good to me. Just a few comments. |
end | ||
|
||
<br> | ||
|
||
### Test if the C:\ partition is NTFS | ||
|
||
describe filesystem('c:\') do |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
miah
Feb 6, 2019
Contributor
Windows drive letters are case insensitive, capital might make it stand out a little in docs but its not a requirement. <3
its('size_kb') { should be >= 32000 } | ||
its('free_kb') { should be >= 3200 } | ||
its('type') { should cmp 'ext4' } | ||
its('percent_free') { should be >= 20 } | ||
end | ||
describe filesystem('c:') do |
This comment has been minimized.
This comment has been minimized.
jerryaldrichiii
Feb 4, 2019
Contributor
Ah, well this is lowercase and no slash. I think we should standardize but don't care enough to hold a PR over it.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@clintoncwolfe this looks awesome! Thanks for taking across the finish line for us! |
jmassardo
and others
added some commits
Jan 29, 2019
clintoncwolfe
force-pushed the
team/filesystem-free-percent
branch
from
95bd8a8
to
dd3d3cb
Feb 6, 2019
miah
approved these changes
Feb 6, 2019
Thanks @clintoncwolfe |
its('size_kb') { should be >= 32000 } | ||
its('free_kb') { should be >= 3200 } | ||
its('type') { should cmp 'ext4' } | ||
its('percent_free') { should be >= 20 } | ||
end | ||
describe filesystem('c:') do |
This comment has been minimized.
This comment has been minimized.
clintoncwolfe
merged commit 48711fa
into
master
Feb 6, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
clintoncwolfe commentedFeb 4, 2019
•
edited
This PR is an adoption of #3767.
In this PR:
size
property; on linux it reports in KB, on Windows it reports in GB; KB was the documented unit. As existing tests may rely on that behavior, thesize
property is scheduled for future deprecation. A warning is added to the docs.size_kb
is introduced, with guaranteed units.free
property from #3767 is renamedfree_kb
and its units corrected.percent_free
is added, range 0..100type
property introduced on #3767 is retained without changes>= 1
(which allowed the GB/KB issue on windows to slip through).Many thanks to @jmassardo for the original work on this to add
free
andtype
, and to @miah for finding the pre-existing issues with units.