Code Monkey home page Code Monkey logo

s3-tests's Introduction

S3 compatibility tests

This is a set of completely unofficial Amazon AWS S3 compatibility tests, that will hopefully be useful to people implementing software that exposes an S3-like API.

The tests only cover the REST interface.

The tests use the Boto library, so any e.g. HTTP-level differences that Boto papers over, the tests will not be able to discover. Raw HTTP tests may be added later.

The tests use the Nose test framework. To get started, ensure you have the virtualenv software installed; e.g. on Debian/Ubuntu:

sudo apt-get install python-virtualenv

and then run:

./bootstrap

You will need to create a configuration file with the location of the service and two different credentials, something like this:

[DEFAULT]
## this section is just used as default for all the "s3 *"
    ## sections, you can place these variables also directly there

## replace with e.g. "localhost" to run against local software
host = s3.amazonaws.com

## uncomment the port to use something other than 80
# port = 8080

## say "no" to disable TLS
is_secure = yes

[fixtures]
## all the buckets created will start with this prefix;
## {random} will be filled with random characters to pad
## the prefix to 30 characters long, and avoid collisions
bucket prefix = YOURNAMEHERE-{random}-

[s3 main]
## the tests assume two accounts are defined, "main" and "alt".

## user_id is a 64-character hexstring
user_id = 0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef

## display name typically looks more like a unix login, "jdoe" etc
display_name = youruseridhere

## replace these with your access keys
access_key = ABCDEFGHIJKLMNOPQRST
secret_key = abcdefghijklmnopqrstuvwxyzabcdefghijklmn

## replace with key id obtained when secret is created, or delete if KMS not tested
kms_keyid = 01234567-89ab-cdef-0123-456789abcdef

[s3 alt]
## another user account, used for ACL-related tests
user_id = 56789abcdef0123456789abcdef0123456789abcdef0123456789abcdef01234
display_name = john.doe
## the "alt" user needs to have email set, too
email = [email protected]
access_key = NOPQRSTUVWXYZABCDEFG
secret_key = nopqrstuvwxyzabcdefghijklmnabcdefghijklm

Once you have that, you can run the tests with:

S3TEST_CONF=your.conf ./virtualenv/bin/nosetests

To gather a list of tests being run, use the flags:

-v --collect-only

You can specify what test(s) to run:

S3TEST_CONF=your.conf ./virtualenv/bin/nosetests s3tests.functional.test_s3:test_bucket_list_empty

Some tests have attributes set based on their current reliability and things like AWS not enforcing their spec stricly. You can filter tests based on their attributes:

S3TEST_CONF=aws.conf ./virtualenv/bin/nosetests -a '!fails_on_aws'

TODO

s3-tests's People

Contributors

alfredodeza avatar andrewschoen avatar calebamiles avatar cbodley avatar cmccabe avatar dang avatar dmick avatar equipsunglasses avatar four2five avatar gaul avatar jdurgin avatar jmunhoz avatar ktdreyer avatar liewegas avatar mattbenjamin avatar mdw-at-linuxbox avatar mwodrich avatar oritwas avatar robbat2 avatar sandonv avatar tianshan avatar tipabu avatar tobegit3hub avatar vasukulkarni avatar wido avatar xylv avatar yehudasa avatar zhouyuan avatar zmc avatar

Watchers

 avatar  avatar

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.