Comments (3)
For this, I'm thinking that a good approach would be to create a WebDAV to S3 client wrapper. We already have a local WebDAV server running for the unit tests there, so the fake S3 client could pull in data from that over WebDAV and then convert it into the same format as the real API. We'll need a way of loading filesystem data from a remote server and WebDAV is as good as any.
This means that both tests will be loading data from the same filesystem, so we can share tests across them. For example, "expect the first item in the directory to have name foo.txt
" or "expect foo.txt
to have type text/plain
" are dependent on specific contents of the test filesystem.
I've already extracted the WebDAV test server out to its own directory on the WebDAV
branch.
Thoughts @jmuk?
from chromeos-filesystems.
As we briefly talked about this offline, using existing webdav local server sounds fine.
But keep in mind that S3 may have weird file names which can't appear in a normal file system (like a file name like with "///foo"). I assume that those exceptional ones can be addressed by other unittests of util.js or something like that without having s3 server.
from chromeos-filesystems.
Yeah, good point. We can cover those exceptional cases with a few separate tests. The test server is now merged, so I'll proceed with this.
from chromeos-filesystems.
Related Issues (20)
- Update truncate method name
- Refactor out chrome mock
- Comment all Gruntfile tasks
- Ways to mock the S3 API HOT 1
- bowerjs
- what is this for HOT 1
- Feature Request: add startIn attribute for ChooseEntry
- Write operations behaviour questions HOT 1
- Challenges with S3 and Write operations
- Can't get WebDAV copy to work HOT 3
- Update new write operations to assign to a variable before exporting to JSDoc can pick them up
- S3FS onWriteFileRequested JSDoc description is wrong
- Write events are not actually registered with the filesystem
- Add lint task for CI
- Condense S3 events into one file
- WebDAV onWriteFileRequested JSDoc is wrong
- Reset filesystem between every test run HOT 2
- Remove Makefiles
- Tidy up WebDAV events file
- Add error handling for S3 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chromeos-filesystems.