Merge "Get func tests passing with a minimal proxy pipeline"

This commit is contained in:
Zuul 2021-03-31 08:09:07 +00:00 committed by Gerrit Code Review
commit e0040c4c55
3 changed files with 22 additions and 2 deletions

View File

@ -19,7 +19,10 @@ from six.moves.urllib.parse import urlparse, urlunparse
import uuid
from random import shuffle
from keystoneclient.v3 import client
try:
from keystoneclient.v3 import ksc
except ImportError:
ksc = None
from swiftclient import get_auth, http_connection
import test.functional as tf
@ -3034,7 +3037,7 @@ class KeystoneClient(BaseClient):
def _get_id(self, user_name):
info = self.users.get(user_name)
keystone_client = client.Client(
keystone_client = ksc.Client(
auth_url=self.auth_url,
version=(self.auth_version,),
username=user_name,
@ -3092,6 +3095,8 @@ class SwiftClient(BaseClient):
class BaseTestAC(unittest.TestCase):
def setUp(self):
if ksc is None:
raise unittest.SkipTest('keystoneclient is not available')
self.reseller_admin = tf.swift_test_user[5]
self.client = SwiftClient()

View File

@ -802,6 +802,16 @@ def requires_digest(digest):
class TestTempurlAlgorithms(Base):
env = TestTempurlEnv
def setUp(self):
super(TestTempurlAlgorithms, self).setUp()
if self.env.tempurl_enabled is False:
raise SkipTest("TempURL not enabled")
elif self.env.tempurl_enabled is not True:
# just some sanity checking
raise Exception(
"Expected tempurl_enabled to be True/False, got %r" %
(self.env.tempurl_enabled,))
def get_sig(self, expires, digest, encoding):
path = urllib.parse.unquote(self.env.conn.make_path(self.env.obj.path))
if six.PY2:

View File

@ -1136,6 +1136,11 @@ class TestSloWithVersioningUTF8(Base2, TestSloWithVersioning):
class TestObjectVersioningChangingMode(Base):
env = TestObjectVersioningHistoryModeEnv
def setUp(self):
super(TestObjectVersioningChangingMode, self).setUp()
if 'versioned_writes' not in cluster_info:
raise SkipTest("versioned_writes not enabled")
def test_delete_while_changing_mode(self):
container = self.env.container
versions_container = self.env.versions_container