Giter Site home page Giter Site logo

Comments (3)

lavelle avatar lavelle commented on May 22, 2024

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.

jmuk avatar jmuk commented on May 22, 2024

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.

lavelle avatar lavelle commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.