Integration testing with Testcontainers#294
Open
NathanBaulch wants to merge 7 commits into
Open
Conversation
NathanBaulch
force-pushed
the
testcontainers
branch
from
November 9, 2025 23:53
4d46112 to
a6b01aa
Compare
NathanBaulch
force-pushed
the
testcontainers
branch
from
January 27, 2026 00:35
a6b01aa to
58067ae
Compare
NathanBaulch
force-pushed
the
testcontainers
branch
from
January 27, 2026 10:27
fc6319f to
3e59868
Compare
NathanBaulch
force-pushed
the
testcontainers
branch
from
January 27, 2026 10:44
3e59868 to
8da443d
Compare
Contributor
Author
|
I was happy to see some work has gone into compliance recently, an area I've also been tackling in this PR. I've merged these improvements and after a few iterations have managed to get all CI checks passing, including the new However this PR includes some temporary fixes and is not yet ready to merge in its current state...
|
funkyshu
added a commit
that referenced
this pull request
Jul 23, 2026
…andling (#347) * test(conformance): add ConformanceOptions to RunIOTests and fix EOF handling Adds optional ConformanceOptions to RunIOTests so backends can skip IO sequences they cannot support; SkipFTPSpecificTests skips the Write,Seek,Write (partial write) cases. Fixes ExecuteSequence to treat io.EOF from a fixed-size read as a valid end-of-file (continue) rather than aborting the sequence. Wires the FTP IO conformance test to skip partial writes. Prepares the canonical testsuite for reuse by a testcontainers module (see #294). Co-authored-by: Cursor <cursoragent@cursor.com> * test(conformance): cover IO runner in CI and make FTP skip robust Addresses review findings on PR B: - Add untagged tests (backend/testsuite/io_conformance_test.go) that run RunIOTests against the mem backend and cover ExecuteSequence's io.EOF continue path via a fake that returns io.EOF alongside a full read. Previously all callers were vfsintegration-gated, so this logic had no coverage in the default test run. - Replace the fragile description-prefix match for the FTP skip with a structured IOTestCase.RequiresSeekWithinWrite field, and lock the mapping with a test. Note left re: verifying the exact FTP-unsupported sequence set against vsftpd in PR C. Co-authored-by: Cursor <cursoragent@cursor.com> * fix(conformance): only forgive io.EOF on a fully-satisfied fixed read Addresses Copilot review: ExecuteSequence discarded the byte count from file.Read and swallowed io.EOF unconditionally, which would also mask a genuine short read (e.g. (0, io.EOF)) as success. Now only forgive EOF when n == the requested byte count; anything less remains a failure. Adds a regression test (shortReadEOFFile) proving a short read paired with io.EOF is reported as an error rather than silently continuing. Co-authored-by: Cursor <cursoragent@cursor.com> --------- Co-authored-by: Cursor <cursoragent@cursor.com>
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.
This project would benefit greatly from using Testcontainers to reliably provision ephemeral backend servers for integration testing. This makes it quick and easy to run integration tests against real servers running locally in Docker without the hassle of creating cloud accounts and managing credentials, etc.
This PR duplicates the two existing
vfsintegrationtest suites and modifies them to run their tests against the following local Docker containers:I've created this sub-module in a folder called "testcontainers" but happy to rename/move.
I've included two backends for S3 since both are quite popular and it's easy enough to test both.
All containers are created using the latest image versions, but there's no reason why they couldn't be pinned to one or more specific versions if needed.
Currently 15 of 340 tests are failing due to bugs/inconsistencies in certain backends. These should be fixed before this PR is merged.