Skip to content

Commit

Permalink
fix: integration tests for windows
Browse files Browse the repository at this point in the history
  • Loading branch information
veeso committed Nov 17, 2024
1 parent 8f70870 commit 264049e
Show file tree
Hide file tree
Showing 8 changed files with 421 additions and 120 deletions.
48 changes: 25 additions & 23 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
name: windows

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: windows-2019

steps:
- uses: actions/checkout@v2
- name: Build
run: cargo build --all-features
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings
- name: Run tests
run: cargo test --no-fail-fast
env:
RUST_LOG: trace
name: windows

on: [push, pull_request]

env:
CARGO_TERM_COLOR: always

jobs:
build:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: install dokany
run: choco install dokany
- name: Build
run: cargo build --all-features
- name: Format
run: cargo fmt --all -- --check
- name: Clippy
run: cargo clippy -- -Dwarnings
- name: Run tests
run: cargo test --no-fail-fast --features integration-tests
env:
RUST_LOG: trace
12 changes: 10 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

<p align="center">~ A FUSE Driver for remotefs-rs ~</p>

<p align="center">Developed by <a href="https://veeso.github.io/" target="_blank">@veeso</a></p>
<p align="center">Developed by <a href="https://veeso.me/" target="_blank">@veeso</a></p>
<p align="center">Current version: 0.1.0</p>

<p align="center">
Expand Down Expand Up @@ -162,6 +162,8 @@ All the features are enabled by default; so if you want to build it with only ce
remotefs-fuse-cli -o opt1 -o opt2=abc --to /mnt/to --volume <volume-name> <aws-s3|ftp|kube|smb|scp|sftp|webdav> [protocol-options...]
```

On Windows the mountpoint can be specified simply using the drive letter `--to M` will mount the FS to `M:\`
where protocol options are
- aws-s3
Expand Down Expand Up @@ -210,6 +212,8 @@ Mount options can be viewed in the docs at <https://docs.rs/remotefs-fuse/latest
## UID and GID override
> ❗ This doesn't apply to Windows.
The possibility to override UID and GID is used because sometimes this scenario can happen:
1. my UID is `1000`
Expand All @@ -221,7 +225,11 @@ That's why I've added `Uid` and `Gid` into the `MountOption` variant.
Setting the `Uid` option to `1002` you'll be able to operate on the File system as it should.
> ❗ This doesn't apply to Windows.
## Project stability
Please consider this is an early-stage project and I haven't heavily tested it, in particular the Windows version.
I suggest you to first test it on test filesystems to see whether the library behaves correctly with your system.
## Changelog ⏳
Expand Down
1 change: 1 addition & 0 deletions remotefs-fuse-cli/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn main() -> anyhow::Result<()> {
log::info!("Mounting remote fs at {}", mount_path.display());

// create the mount point if it does not exist
#[cfg(unix)]
if !mount_path.exists() {
log::info!("creating mount point at {}", mount_path.display());
std::fs::create_dir_all(&mount_path)?;
Expand Down
2 changes: 2 additions & 0 deletions remotefs-fuse/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,15 @@ nix = { version = "0.29", features = ["fs"] }
dashmap = "6"
dokan = "0.3.1"
dokan-sys = "0.3.1"
path-slash = "0.2"
widestring = "0.4.3"
winapi = "0.3.9"

[dev-dependencies]
env_logger = "^0.11"
pretty_assertions = "^1"
remotefs-memory = "0.1"
serial_test = "^3"

[target.'cfg(unix)'.dev-dependencies]
nix = { version = "0.29", features = ["user"] }
Expand Down
Loading

0 comments on commit 264049e

Please sign in to comment.