crates/e2e_test/src/protocols/README.md
FTPS, WebDAV, and SFTP protocol end-to-end tests for RustFS.
No external SSH tooling is required. The test framework generates ed25519 host keys in-process via russh::keys under the per-test temp directory before each SFTP server spawn, and russh-sftp drives the protocol from the test process directly.
RUSTFS_BUILD_FEATURES=ftps,webdav,sftp cargo test --package e2e_test test_protocol_core_suite -- --test-threads=1 --nocapture
RUSTFS_BUILD_FEATURES controls which features the test rustfs binary is
built with. When this variable is set, the protocol test runner schedules
only entries whose protocol is present in the requested feature list. Leave
it unset to run every protocol entry.
--test-threads=1 is required because every entry spawns a rustfs server
on fixed bind ports.
The SFTP suite lives in three entries plus a standalone idle-timeout case.
Every assertion runs against a freshly spawned rustfs binary with
RUSTFS_SFTP_ENABLE=true; the test framework also pins
RUSTFS_SFTP_PART_SIZE=5242880 so the multipart boundary is deterministic.
test_sftp_core_operations)Bind ports 9022 (SFTP) and 9200 (S3). 22 in-suite assertions covering the core protocol surface plus cross-protocol consistency:
__XLDIR__ marker visible via SFTP readdir as a
directory entrytest_sftp_compliance_suite)Bind ports 9024 (SFTP) and 9300 (S3). 14 compliance regression cases against one shared server spawn. Each case carries a stable CMPTST-NN identifier:
/.. either errors or returns a listing that
contains no host system entriestest_sftp_compliance_readonly)Bind ports 9025 (SFTP) and 9301 (S3). Spawns a second rustfs binary with
RUSTFS_SFTP_READ_ONLY=true; the S3 endpoint stays writable so the suite
can seed a bucket and a fixture object via aws-sdk-s3 before opening the
SFTP session. 7 compliance cases:
The full case index lives at the top of sftp_compliance.rs; each helper's
log lines name its CMPTST-NN code so a failure in CI points at one named
property without consulting any external doc.
test_sftp_idle_timeout_disconnects)Bind ports 9023 (SFTP) and 9100 (S3). Spawns rustfs with
RUSTFS_SFTP_IDLE_TIMEOUT=5, sleeps 10 s past the timeout, then issues an
SFTP request and asserts the server has closed the session.