]> git-server-git.apps.pok.os.sepia.ceph.com Git - s3-tests.git/commitdiff
test_object_create_bad_authorization_incorrect: fixes wip-bad-auth-test 28/head
authorYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Dec 2014 20:56:53 +0000 (12:56 -0800)
committerYehuda Sadeh <yehuda@inktank.com>
Tue, 16 Dec 2014 20:56:53 +0000 (12:56 -0800)
The test should expect BadSignature. Also, provide a key that does not
already exist on aws.

Signed-off-by: Yehuda Sadeh <yehuda@inktank.com>
s3tests/functional/test_headers.py

index 7eea63160104097df5534d4ad1dfaa2e5280c195..cedee67de8f0b48c15eb5246fbd262c98a293647 100644 (file)
@@ -503,12 +503,12 @@ def test_object_create_bad_authorization_none():
 @attr(assertion='fails 403')
 @nose.with_setup(teardown=_clear_custom_headers)
 def test_object_create_bad_authorization_incorrect():
-    key = _setup_bad_object({'Authorization': 'AWS AKIAIGR7ZNNBHC5BKSUA:FWeDfwojDSdS2Ztmpfeubhd9isU='})
+    key = _setup_bad_object({'Authorization': 'AWS AKIAIGR7ZNNBHC5BKSUB:FWeDfwojDSdS2Ztmpfeubhd9isU='})
 
     e = assert_raises(boto.exception.S3ResponseError, key.set_contents_from_string, 'bar')
     eq(e.status, 403)
     eq(e.reason, 'Forbidden')
-    assert e.error_code in ('AccessDenied', 'SignatureDoesNotMatch')
+    assert e.error_code in ('AccessDenied', 'SignatureDoesNotMatch', 'InvalidAccessKeyId')
 
 
 @attr(resource='object')