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
089d0b3bba
commit
6e551257f6
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue