Modify to use libraries compatible with python3
This commit addresses some of the issues seen with compatibility of libraries in 'congress-devstack-py35-api-mysql' gate job. Partial-Bug:#1731141 Change-Id: I2cd487a712c3f5a6b113f7446d498add32eee9ab
This commit is contained in:
parent
be294587fd
commit
42afa8729b
|
@ -13,8 +13,7 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import json
|
||||
|
||||
from oslo_serialization import jsonutils as json
|
||||
from tempest.lib.common import rest_client
|
||||
|
||||
|
||||
|
|
|
@ -15,11 +15,11 @@
|
|||
|
||||
import os
|
||||
import socket
|
||||
from StringIO import StringIO
|
||||
import subprocess
|
||||
import tempfile
|
||||
|
||||
from oslo_log import log as logging
|
||||
import six
|
||||
from tempest.common import credentials_factory as credentials
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import test_utils
|
||||
|
@ -219,7 +219,7 @@ class TestHA(manager_congress.ScenarioPolicyBase):
|
|||
LOG.debug("Replica port %s service %s logs: %s",
|
||||
port_num,
|
||||
service_key,
|
||||
StringIO(output).getvalue())
|
||||
six.StringIO(output.decode()).getvalue())
|
||||
raise exceptions.TimeoutException("Replica Server not ready")
|
||||
# Relica server is up
|
||||
replica_server = True
|
||||
|
|
|
@ -14,6 +14,10 @@
|
|||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
|
||||
from tempest.common import utils
|
||||
from tempest import config
|
||||
from tempest.lib.common.utils import test_utils
|
||||
|
@ -23,11 +27,6 @@ from tempest.lib import exceptions
|
|||
from congress_tempest_tests.tests.scenario import helper
|
||||
from congress_tempest_tests.tests.scenario import manager_congress
|
||||
|
||||
import random
|
||||
import string
|
||||
import time
|
||||
|
||||
|
||||
CONF = config.CONF
|
||||
|
||||
|
||||
|
@ -49,7 +48,7 @@ class TestPolicyBasicOps(manager_congress.ScenarioPolicyBase):
|
|||
self.servers = []
|
||||
|
||||
def _create_random_policy(self):
|
||||
policy_name = "nova_%s" % ''.join(random.choice(string.lowercase)
|
||||
policy_name = "nova_%s" % ''.join(random.choice(string.ascii_lowercase)
|
||||
for x in range(10))
|
||||
body = {"name": policy_name}
|
||||
resp = self.os_admin.congress_client.create_policy(body)
|
||||
|
|
|
@ -43,6 +43,7 @@
|
|||
# enable_plugin murano git://git.openstack.org/openstack/murano
|
||||
# enable_plugin aodh git://git.openstack.org/openstack/aodh
|
||||
# enable_plugin designate git://git.openstack.org/openstack/designate
|
||||
enable_plugin neutron https://git.openstack.org/openstack/neutron
|
||||
# To deploy congress as multi-process (api, pe, datasources)
|
||||
CONGRESS_MULTIPROCESS_DEPLOYMENT=True
|
||||
CONGRESS_EXPOSE_ENCRYPTION_KEY_FOR_TEST=True
|
||||
|
@ -60,7 +61,7 @@
|
|||
# swift is not ready for python3 yet
|
||||
# ENABLED_SERVICES=s-proxy,s-object,s-container,s-account,
|
||||
# ENABLED_SERVICES+=h-eng,h-api,h-api-cfn,h-api-cw
|
||||
|
||||
ENABLED_SERVICES+=q-qos
|
||||
export PYTHONUNBUFFERED=true
|
||||
export DEVSTACK_GATE_TEMPEST=1
|
||||
export DEVSTACK_GATE_TEMPEST_ALL_PLUGINS=1
|
||||
|
|
Loading…
Reference in New Issue