Conversation
This commit introduces a major architectural refactoring by extracting the core volume driver functionality into a reusable `Driver` trait and implementing it through a new `Plugin` struct. Key changes include: - Added `async-trait` dependency to support async trait methods - Created generic `Driver` trait defining volume operations - Implemented `Plugin` struct that wraps the existing volume management logic - Updated all handlers to use the `Plugin` interface instead of direct state access - Simplified handler implementations by delegating to plugin methods - Maintained existing functionality while improving code organization - Updated tests to work with the new plugin architecture
Add axum-test crate for integration testing and implement comprehensive tests for the volume driver API. This includes tests for all endpoints: activate, capabilities, create, remove, list, get, path, mount, and unmount. The tests cover both success and error scenarios with proper mocking and assertions.
- Extract test utilities into dedicated `test_mocks` module - Implement comprehensive test methods for plugin operations - Add extensive test coverage for create, mount, unmount, remove operations - Test various scenarios including error cases and edge conditions
The entire app module containing Docker Volume Driver API handlers has been deleted. This includes: - HTTP route handlers for all volume operations - Request/response type definitions - Middleware for request/response transformation - Comprehensive test suite The plugin now directly implements the Driver trait to handle volume operations.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.