Skip to content

Conversation

@peterbroadhurst
Copy link
Contributor

@peterbroadhurst peterbroadhurst commented Dec 5, 2022

Core half of hyperledger/firefly-common#39

Ready to review - but should not merge until FF Common change makes it into a release

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
@codecov-commenter
Copy link

codecov-commenter commented Dec 5, 2022

Codecov Report

Merging #1110 (37aed42) into main (057a7af) will increase coverage by 0.04%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main    #1110      +/-   ##
==========================================
+ Coverage   99.93%   99.97%   +0.04%     
==========================================
  Files         309      302       -7     
  Lines       20546    19426    -1120     
==========================================
- Hits        20532    19422    -1110     
+ Misses         10        4       -6     
+ Partials        4        0       -4     
Impacted Files Coverage Δ
internal/apiserver/ffi2swagger.go 100.00% <ø> (ø)
internal/apiserver/route_get_data_blob.go 100.00% <ø> (ø)
internal/apiserver/route_get_data_value.go 100.00% <ø> (ø)
internal/apiserver/route_get_msg_data.go 100.00% <ø> (ø)
internal/apiserver/route_get_namespaces.go 100.00% <ø> (ø)
internal/apiserver/route_get_txn_by_id.go 100.00% <ø> (ø)
internal/apiserver/route_spi_get_namespaces.go 100.00% <ø> (ø)
internal/apiserver/route_spi_post_reset.go 100.00% <ø> (ø)
internal/apiserver/routes.go 100.00% <ø> (ø)
internal/events/aggregator_batch_state.go 100.00% <ø> (ø)
... and 88 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
Copy link
Contributor

@nguyer nguyer left a comment

Choose a reason for hiding this comment

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

Just a couple of questions, but otherwise very straightforward. Looks good.

mock.ExpectBegin().WillReturnError(fmt.Errorf("pop"))
err := s.InsertBlob(context.Background(), &core.Blob{})
assert.Regexp(t, "FF10114", err)
assert.Regexp(t, "FF00175", err)
Copy link
Contributor

Choose a reason for hiding this comment

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

There are a lot of error codes that have changed throughout this PR. Is there a migration consideration here?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

With our current architecture for errors, moving them between repos, means changing them - as the prefixes are reserved in each repo.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I've added the migration_consideration tag so we can include it the release notes

return mp.Name()
}

func (psql *mockProvider) Features() SQLFeatures {
Copy link
Contributor

Choose a reason for hiding this comment

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

Question on this file. Do we need this anymore? internal/database/sqlcommon/provider.go was removed above, so I'm wondering if we need the mock test anymore? Or should this be in firefly-common?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We do - we have a mix of tests that use SQLite for an E2E "real" test, like TestBatch2EWithDB, and others that fill out coverage by testing edge cases using the mock provider.

Signed-off-by: Peter Broadhurst <peter.broadhurst@kaleido.io>
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.

3 participants