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

Add more tests for storage #219

Merged
merged 2 commits into from
Nov 24, 2021
Merged

Add more tests for storage #219

merged 2 commits into from
Nov 24, 2021

Conversation

fxamacker
Copy link
Member

Closes #218

Description

  • Add tests to cover the non-error paths of atree storage code
  • Moved InMemBaseStorage to test file because it's only used in tests
  • Moved some code in storage.go

  • 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

Also
- Moved InMemBaseStorage to test file because it's only used in tests
- Moved some code in storage.go
InMemBaseStorage was is only used in tests.
Copy link
Member

@turbolent turbolent left a comment

Choose a reason for hiding this comment

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

Nice!

require.Equal(t, want, id)
require.NoError(t, err)
})
t.Run("data length > storage id size", func(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

Great tests 👍

@fxamacker fxamacker merged commit c2f5fd0 into main Nov 24, 2021
@fxamacker fxamacker deleted the fxamacker/add-more-tests-2 branch November 30, 2021 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add more tests to cover the happy paths in storage
2 participants