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
[disk] handle multilines df output #2733
Conversation
This is not the right way to do it. I'll update once we know more. |
f2e4c80
to
cf99281
Compare
Updated with a test, it works now! |
tmpfs tmpfs 32969616 0 32969616 0% /dev/shm | ||
/dev/sda1 ext4 512752 90460 395412 19% /boot | ||
10.1.5.223:/vil/cor | ||
nfs 1020054752 56080768 963973984 6% /cor |
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.
Nitpick: the output seems to be aligned by column, it might be good to make sure the fixture has all the extra white spaces this implies (see
Lines 39 to 51 in a681245
linux_df_k = """Filesystem 1K-blocks Used Available Use% Mounted on | |
/dev/sda1 8256952 5600592 2236932 72% / | |
none 3802316 124 3802192 1% /dev | |
none 3943856 0 3943856 0% /dev/shm | |
none 3943856 148 3943708 1% /var/run | |
none 3943856 0 3943856 0% /var/lock | |
none 3943856 0 3943856 0% /lib/init/rw | |
/dev/sdb 433455904 305360 411132240 1% /mnt | |
/dev/sdf 52403200 40909112 11494088 79% /data | |
nfs:/abc/def/ghi/jkl/mno/pqr | |
52403200 40909112 11494088 79% /data | |
/dev/sdg 52403200 40909112 11494088 79% /data | |
""" |
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.
Nice 👀
Added 2 nitpicks, but overall this looks 💚 ! Feel free to merge once they're addressed |
When moving the disk check outside of `checks/`, `_is_number` method was forgotten. This is now fixed and a test is added.
cf99281
to
9acfc84
Compare
Thanks for the review, I addressed both comments, waiting for 🍏 . |
💚 (CI failure is caused by an elasticsearch test that fails during setup, unrelated) |
What does this PR do?
remove missing method
_is_number
indisk
check.Motivation
Fix #2732
Additional Notes
The previous method was: