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

feat(test): Add UT for cstor, lvm, zfs storage package #65

Merged
merged 5 commits into from
Jul 26, 2021

Conversation

vharsh
Copy link

@vharsh vharsh commented Jul 22, 2021

Summary:

  • Coverage of storage package is now ~69.2%
  • cas-based pool lister functions now return metav1.TableRow & metav1.TableColumnDefinition
  • TODO: Return pool describe output in a structure, so that code can be unit tested
  • The CStor pool list feature, kubectl openebs get storage --cas-type=cstor displays the AGE of the CStor pool, this value shouldn't be compared, as the time.Since cannot be mocked very easily without doing semi-crazy things, the golang playground has done something similar but I don't know how the same can be achieved without monkeypatching

Signed-off-by: Harsh Vardhan [email protected]

@vharsh vharsh linked an issue Jul 22, 2021 that may be closed by this pull request
6 tasks
Copy link
Member

@Abhinandan-Purkait Abhinandan-Purkait left a comment

Choose a reason for hiding this comment

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

LGTM! Only one thing, can we move the variables to testdata_test since we are following the same pattern in other packages.

Harsh Vardhan added 2 commits July 26, 2021 09:56
}
util.TablePrinter(util.CstorPoolListColumnDefinations, rows, printers.PrintOptions{Wide: true})
return nil
return util.CstorPoolListColumnDefinations, rows, nil
Copy link
Member

Choose a reason for hiding this comment

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

Thank you, for this change.

@vharsh vharsh merged commit 512b782 into openebs:develop Jul 26, 2021
@vharsh vharsh deleted the pool_ut branch July 26, 2021 09:39
@vharsh vharsh self-assigned this Jul 26, 2021
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.

Unit testing for all packages
2 participants