SMB Server Phase 2: VFS backend build fix + integration test
- Add VfsFile: Send supertrait for Mutex compatibility - Fix SmbServerCommand: struct → Subcommand enum with Start variant - Fix tracing_subscriber::init() → try_init() to avoid panic when logger already initialized - Fix CLI subcommand name: smb-server → smb-start (flatten naming) - Add #[command(name = "smb-start")] for CLI disambiguation - Fix unused variable warnings (smb_fs.rs, smb_server_backend.rs) - Remove unused VfsFile imports (webdav.rs, scp_handler.rs) - Integration test: Docker smbclient verified (list, upload, read)
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
pub mod render;
|
||||
pub mod smb_server;
|
||||
pub mod test;
|
||||
|
||||
use clap::Subcommand;
|
||||
@@ -9,12 +10,15 @@ pub enum ToolsCommands {
|
||||
Render(render::RenderCommand),
|
||||
#[command(flatten)]
|
||||
Test(test::TestCommand),
|
||||
#[command(flatten)]
|
||||
SmbServer(smb_server::SmbServerCommand),
|
||||
}
|
||||
|
||||
pub async fn handle_tools_command(cmd: ToolsCommands) -> anyhow::Result<()> {
|
||||
match cmd {
|
||||
ToolsCommands::Render(c) => render::handle_render_command(c)?,
|
||||
ToolsCommands::Test(c) => test::handle_test_command(c)?,
|
||||
ToolsCommands::SmbServer(c) => smb_server::handle_smb_server_command(c).await?,
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user