Skip to content

Running Ceph S3 Tests

kellymclaughlin edited this page Mar 6, 2013 · 5 revisions

Instructions on how to run the Ceph S3 tests on OSX against a local Riak CS install

  1. Clone the s3-tests repo
  2. Install pip: sudo easy_install pip
  3. Install virtualenv: sudo pip install virtualenv
  4. Install virtualenvwrapper: sudo pip install virtualenvwrapper
  5. mkdir ~/.virtualenvs
  6. virtualenv --no-site-packages --distribute virtualenv
  7. ./virtualenv/bin/pip install --upgrade pip
  8. ./virtualenv/bin/pip install -r requirements.txt
  9. ./virtualenv/bin/python setup.py develop --allow-hosts None
  10. Setup and start Riak, Riak CS, and stanchion.
  11. Create two user accounts for testing.
  12. Create config file using the following template:
    [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 = kellycs.net
    
    ## uncomment the port to use something other than 80
    port = 8080
    
    ## say "no" to disable TLS
    is_secure = no
    
    [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 = cs-s3-tests-{random}-
    
    [s3 main]
    ## the tests assume two accounts are defined, "main" and "alt".
    
    ## user_id is a 64-character hexstring
    user_id = 20ff1aedc2a76934db8a51f888b5874185dbe5533827fa5579043b5fbd3e7e18
    
    ## display name typically looks more like a unix login, "jdoe" etc
    display_name = test1
    
    ## replace these with your access keys
    access_key = _IYKHJDQKJFFESDCCDNL
    secret_key = X8rqB5mlPtpcMuzL1BRWIqdM20kiCx4cD_6xlw==
    
    [s3 alt]
    ## another user account, used for ACL-related tests
    user_id = dffd7d507b096a0a3f24269fca4aca24deec628560c02c65c98273610c4bde64
    display_name = test2
    ## the "alt" user needs to have email set, too
    email = test2@test.com
    access_key = 3GI6PK5IRFZPE4HZBSZF
    secret_key = JX85QTKSbMeghN6QxqkF8ZnIQCONGDp_H9L5Qg==
    
  13. Run some tests:
    • To run all of the tests: S3TEST_CONF=*your.conf* ./virtualenv/bin/nosetests
    • To run the functional tests: S3TEST_CONF=*your.conf* ./virtualenv/bin/nosetests s3tests.functional.test_s3
    • To run a specific test: S3TEST_CONF=s3-tests.conf ./virtualenv/bin/nosetests --tests=s3tests.functional.test_s3:test_bucket_acl_xml_write