Merge "Test Case to check "copy object across container""
diff --git a/etc/tempest.conf.sample b/etc/tempest.conf.sample
index ed3cf6c..020baa1 100644
--- a/etc/tempest.conf.sample
+++ b/etc/tempest.conf.sample
@@ -210,12 +210,8 @@
[object-storage]
# This section contains configuration options used when executing tests
# against the OpenStack Object Storage API.
-# This should be the username of a user WITHOUT administrative privileges
-username = admin
-# The above non-administrative user's password
-password = password
-# The above non-administrative user's tenant name
-tenant_name = admin
+
+# You can configure the credentials in the compute section
# The type of endpoint for an Object Storage API service. Unless you have a
# custom Keystone service catalog implementation, you probably want to leave
diff --git a/etc/tempest.conf.tpl b/etc/tempest.conf.tpl
index 880a3c1..8ef5b84 100644
--- a/etc/tempest.conf.tpl
+++ b/etc/tempest.conf.tpl
@@ -181,11 +181,8 @@
# This section contains configuration options used when executing tests
# against the OpenStack Object Storage API.
# This should be the username of a user WITHOUT administrative privileges
-username = %USERNAME%
-# The above non-administrative user's password
-password = %PASSWORD%
-# The above non-administrative user's tenant name
-tenant_name = %TENANT_NAME%
+
+# You can configure the credentials in the compute section
# The type of endpoint for an Object Storage API service. Unless you have a
# custom Keystone service catalog implementation, you probably want to leave
diff --git a/tempest/common/utils/data_utils.py b/tempest/common/utils/data_utils.py
index c5d5c7e..22e4742 100644
--- a/tempest/common/utils/data_utils.py
+++ b/tempest/common/utils/data_utils.py
@@ -18,6 +18,8 @@
import random
import re
import urllib
+import itertools
+
from tempest import exceptions
@@ -62,24 +64,10 @@
def arbitrary_string(size=4, base_text=None):
- """Return exactly size bytes worth of base_text as a string"""
-
- if (base_text is None) or (base_text == ''):
+ """
+ Return size characters from base_text, repeating the base_text infinitely
+ if needed.
+ """
+ if not base_text:
base_text = 'test'
-
- if size <= 0:
- return ''
-
- extra = size % len(base_text)
- body = ''
-
- if extra == 0:
- body = base_text * size
-
- if extra == size:
- body = base_text[:size]
-
- if extra > 0 and extra < size:
- body = (size / len(base_text)) * base_text + base_text[:extra]
-
- return body
+ return ''.join(itertools.islice(itertools.cycle(base_text), size))
diff --git a/tempest/config.py b/tempest/config.py
index 0ccd4b6..cd41f1c 100644
--- a/tempest/config.py
+++ b/tempest/config.py
@@ -400,21 +400,6 @@
SECTION_NAME = "object-storage"
@property
- def username(self):
- """Username to use for Object-Storage API requests."""
- return self.get("username", "admin")
-
- @property
- def tenant_name(self):
- """Tenant name to use for Object-Storage API requests."""
- return self.get("tenant_name", "admin")
-
- @property
- def password(self):
- """API key to use when authenticating."""
- return self.get("password", "password")
-
- @property
def catalog_type(self):
"""Catalog type of the Object-Storage service."""
return self.get("catalog_type", 'object-store')
diff --git a/tempest/tests/compute/keypairs/test_keypairs.py b/tempest/tests/compute/keypairs/test_keypairs.py
index 95520b5..9d297f6 100644
--- a/tempest/tests/compute/keypairs/test_keypairs.py
+++ b/tempest/tests/compute/keypairs/test_keypairs.py
@@ -137,6 +137,7 @@
self.fail('Expected BadRequest for invalid public key')
@attr(type='negative')
+ @unittest.skip("Skipped until the Bug #1086980 is resolved")
def test_keypair_delete_nonexistant_key(self):
"""Non-existant key deletion should throw a proper error"""
k_name = rand_name("keypair-non-existant-")
diff --git a/tempest/tests/compute/test_authorization.py b/tempest/tests/compute/test_authorization.py
index 12fa94b..0d08c18 100644
--- a/tempest/tests/compute/test_authorization.py
+++ b/tempest/tests/compute/test_authorization.py
@@ -232,6 +232,7 @@
@raises(exceptions.NotFound)
@attr(type='negative')
+ @unittest.skip("Skipped until the Bug #1086980 is resolved")
def test_delete_keypair_of_alt_account_fails(self):
"""A DELETE request for another user's keypair should fail"""
self.alt_keypairs_client.delete_keypair(self.keypairname)