S3 tests are available in s3tests branch in git.cloud.com (This needs to be fixed, it should be on the apache repo)
Procedure how to execute the tests
#Deploy the cloudstack (3.0.3) or above code.
#Enable S3 ( in CS UI -> Global Settings, search for ‘enable.s3.api’ change the flag to 'true' and restart the management server)
#register an user to access the S3 API.
./cloudstack-aws-api-register -u http://<s3hostip>:7080/awsapi/rest/AmazonS3 -a admin -s admin openssl_generated.mycert.pem
NOTE: please create user name and password as admin/admin. I had hardcoded them in the test files for the time being.
#checkout s3tests and go to 's3tests\tests' folder
Configure the boto S3Connection object as follows:
calling_format= OrdinaryCallingFormat() connection = S3Connection(aws_access_key_id=<your api key>, aws_secret_access_key=<your secret key> is_secure=False, host='<cloudstack-server>', port=7080, //S3 service port calling_format=calling_format, path="/awsapi/rest/AmazonS3") //prefix path.
#execute the S3 tests using the command.
./test.py -t s3 -v 0
replace last argument 0 with 0 or 1 or 2 for different level of verbosity
The functionality is tested by these tests are
currently I had disabled testing the functionality of
These are the current test results :
---------------------------------------------------------------------- Ran 27 tests in 17.080s FAILED (failures=11, errors=3)