This commit is contained in:
veeso
2023-05-09 15:40:21 +02:00
parent 9009002b6e
commit c5eeae74b7
83 changed files with 398 additions and 358 deletions

View File

@@ -2,16 +2,17 @@
//!
//! Remotefs client builder
use super::params::{AwsS3Params, GenericProtocolParams};
use super::{FileTransferProtocol, ProtocolParams};
use crate::system::config_client::ConfigClient;
use crate::system::sshkey_storage::SshKeyStorage;
use std::path::PathBuf;
use remotefs::RemoteFs;
use remotefs_aws_s3::AwsS3Fs;
use remotefs_ftp::FtpFs;
use remotefs_ssh::{ScpFs, SftpFs, SshOpts};
use std::path::PathBuf;
use super::params::{AwsS3Params, GenericProtocolParams};
use super::{FileTransferProtocol, ProtocolParams};
use crate::system::config_client::ConfigClient;
use crate::system::sshkey_storage::SshKeyStorage;
/// Remotefs builder
pub struct Builder;
@@ -123,11 +124,12 @@ impl Builder {
#[cfg(test)]
mod test {
use super::*;
use std::path::{Path, PathBuf};
use tempfile::TempDir;
use super::*;
#[test]
fn should_build_aws_s3_fs() {
let params = ProtocolParams::AwsS3(

View File

@@ -54,12 +54,13 @@ impl std::str::FromStr for FileTransferProtocol {
#[cfg(test)]
mod tests {
use super::*;
use pretty_assertions::assert_eq;
use std::str::FromStr;
use std::string::ToString;
use pretty_assertions::assert_eq;
use super::*;
#[test]
fn test_filetransfer_mod_protocol() {
assert_eq!(

View File

@@ -2,10 +2,10 @@
//!
//! file transfer parameters
use super::FileTransferProtocol;
use std::path::{Path, PathBuf};
use super::FileTransferProtocol;
/// Holds connection parameters for file transfers
#[derive(Debug, Clone)]
pub struct FileTransferParams {
@@ -238,9 +238,10 @@ impl AwsS3Params {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;
use super::*;
#[test]
fn test_filetransfer_params() {
let params: FileTransferParams =