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

Export PersistentSlabStorage funcs in export_test.go #481

Merged

Conversation

fxamacker
Copy link
Member

Updates #464

Currently, some tests are using unexported fields of PersistentSlabStorage.

This commit improves decoupling:

  • in storage.go, create unexported functions for those fields
  • in export_test.go, export those unexported functions in same package, so those exported functions can be used for testing in test package.
  • modify tests to use the newly exported functions.

  • Targeted PR against main branch
  • Linked to Github issue with discussion and accepted design OR link to spec that describes this work
  • Code follows the standards mentioned here
  • Updated relevant documentation
  • Re-reviewed Files changed in the Github PR explorer
  • Added appropriate labels

@fxamacker fxamacker self-assigned this Jan 24, 2025
@fxamacker fxamacker requested a review from turbolent as a code owner January 24, 2025 13:53
@fxamacker fxamacker force-pushed the fxamacker/export-persistentslabstorage-funcs-for-testing branch from c994827 to 749cf71 Compare January 24, 2025 15:42
@fxamacker fxamacker changed the base branch from fxamacker/use-NewDefaultDigesterBuild-func-in-tests to main January 28, 2025 16:04
Currently, some tests are using unexported fields of
PersistentSlabStorage.

This commit improves decoupling:
- in storage.go, create unexported functions for those fields
- in export_test.go, export those unexported functions in same package,
so those exported functions can be used for testing in test package.
- modify tests to use the newly exported functions.
@fxamacker fxamacker force-pushed the fxamacker/export-persistentslabstorage-funcs-for-testing branch from 749cf71 to 1022e0f Compare January 28, 2025 17:34
@fxamacker fxamacker merged commit fc5a825 into main Jan 28, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants