Skip to content

Refactor BeeMsg and gRPC handlers to allow testing them as a whole #4

@rustybee42

Description

@rustybee42

Since most operations done with the management are "request-response-style" and they can either succeed or fail, it makes a lot of sense to write tests for them as a whole. This would allow test coverage of 90% of the functionality, including all the SQL stuff, without having to rely on very small tests for SQL (which gets tedious very fast) and very big system tests that require setting up a whole BeeGFS.

To achieve this, the dependencies passed into the handlers (e.g. things in Context) must be mockable. This is mainly the BeeMsg connection pool handle. A mock pool is needed to catch outgoing requests and provide a response for the handler.

Testing the whole handlers instead of separate sql functions will also solve https://github.com/ThinkParQ/beegfs-rs/issues/57.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions