Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test lakefsfs with mock server (#6646)
* Partial component test of lakeFSFS using mock lakeFS server LakeFSFileSystemServerTest will replace LakeFSFileSystemTest once all tests are translated. It fakes actual lakeFS responses using a MockServer. That is a more complete test: test lakeFSFS versus the on-the-wire interface not versus the generated SDK. In particular the generated SDK will change soon (#6424) to have a completely different API. And Mockito cannot easily mock the new API. Fixes #6554. * Change default response to 418 ("not a teapot") lakeFSFS relies on 404s ("not found") for things such as directory marker creation. Without this, its behaviour in various states cannot be simulated. Also always returning a 404 makes it nearly impossible to distinguish that no mock request matched. * Add test{Delete,Create,Mkdirs,Open,ListStatus,Rename}* Some testRename* tests still commented-out, we will do them separately so as not to delay the new Java SDK. * Split off tests that require S3 (MinIO) from others Initial refactoring to allow LakeFSFileSystemPresignedModeTest and LakeFSFileSystemSimpleModeTest to be clearly written. This refactoring also removes MinIO from _most_ tests in LakeFSFileSystemServerTest, which allows these tests to be less brittle while running faster. **MUST** bump Maven Surefire Plugin (the JUnit test runner) version to 3.x from 2.x, to get rid of "No tests found matching Method..." failure messages that appear for no apparent reason. * Reduce logs (they were doubled) and configure S3A to avoid a warning * Add simple & presigned tests for open, create These are over MinIO, ensuring that presigned works at least there. (MinIO is similar enough to S3 on this, and indeed _probably_ any HTTP server supporting GET and PUT would be enough to check presigned works...). * Remove unused files These now happen as parameters in LakeFSFileSystemServerS3Test. * "expect" -> "mock" Flavour of the day :-) * [CR] Uncomment remaining tests, fix TODOne TODOs
- Loading branch information