Skip to content

check for empty volume name#77

Merged
panigs7 merged 2 commits into
mainfrom
vol-name-empty-check
Aug 8, 2025
Merged

check for empty volume name#77
panigs7 merged 2 commits into
mainfrom
vol-name-empty-check

Conversation

@panigs7

@panigs7 panigs7 commented Aug 8, 2025

Copy link
Copy Markdown
Contributor

Description

Added check to return error if volume name is empty when getting mount info of a device

GitHub Issues

List the GitHub issues impacted by this PR:

GitHub Issue #
https://github.com/dell/csm/issues/1896

Checklist:

  • I have performed a self-review of my own code to ensure there are no formatting, vetting, linting, or security issues
  • I have verified that new and existing unit tests pass locally with my changes
  • I have not allowed coverage numbers to degenerate
  • I have maintained at least 90% code coverage
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • Backward compatibility is not broken

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also list any relevant details for your test configuration

  • Previously, if volume name was empty, getMountInfoFromDevice was still returning sda data which was not required.
image

Added check to return error when volume name is empty

@github-actions

github-actions Bot commented Aug 8, 2025

Copy link
Copy Markdown

Merging this branch will decrease overall coverage

Impacted Packages Coverage Δ 🤖
github.com/dell/gofsutil 85.05% (-0.07%) 👎

Coverage by file

Changed files (no unit tests)

Changed File Coverage Δ Total Covered Missed 🤖
github.com/dell/gofsutil/gofsutil_mount_linux.go 75.88% (-0.15%) 340 (+2) 258 (+1) 82 (+1) 👎

Please note that the "Total", "Covered", and "Missed" counts above refer to code statements instead of lines of code. The value in brackets refers to the test coverage of that file in the old version of the code.

@shanmydell shanmydell left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me!

@panigs7 panigs7 merged commit 511ec63 into main Aug 8, 2025
6 checks passed
@panigs7 panigs7 deleted the vol-name-empty-check branch August 8, 2025 10:18
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.

4 participants