Skip to content

Commit

Permalink
Merge "Refactoring structure of rally/verification"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jenkins authored and openstack-gerrit committed Jan 2, 2015
2 parents 2ee9c83 + 835aaa7 commit b3c832a
Show file tree
Hide file tree
Showing 30 changed files with 40 additions and 40 deletions.
2 changes: 1 addition & 1 deletion rally/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from rally import exceptions
from rally import log as logging
from rally import objects
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import tempest

LOG = logging.getLogger(__name__)

Expand Down
4 changes: 2 additions & 2 deletions rally/benchmark/context/tempest.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
from rally.common import utils
from rally import exceptions
from rally import log as logging
from rally.verification.verifiers.tempest import config
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import config
from rally.verification.tempest import tempest

LOG = logging.getLogger(__name__)

Expand Down
2 changes: 1 addition & 1 deletion rally/benchmark/validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
from rally.common.i18n import _
from rally import consts
from rally import exceptions
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import tempest


class ValidationResult(object):
Expand Down
4 changes: 2 additions & 2 deletions rally/cmd/commands/verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
from rally import exceptions
from rally import objects
from rally.openstack.common import cliutils as common_cliutils
from rally.verification.verifiers.tempest import diff
from rally.verification.verifiers.tempest import json2html
from rally.verification.tempest import diff
from rally.verification.tempest import json2html


class VerifyCommands(object):
Expand Down
2 changes: 1 addition & 1 deletion rally/cmd/manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from rally.cmd import cliutils
from rally.cmd import envutils
from rally import db
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import tempest


class DBCommands(object):
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

import json

import compare2html
from rally.verification.tempest import compare2html


class Diff(object):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# under the License.

from rally.ui import utils as ui_utils
from rally.verification.verifiers.tempest import subunit2json
from rally.verification.tempest import subunit2json


STATUS_MAP = {subunit2json.STATUS_PASS: "pass",
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
from rally.common import utils
from rally import exceptions
from rally import log as logging
from rally.verification.verifiers.tempest import config
from rally.verification.verifiers.tempest import subunit2json
from rally.verification.tempest import config
from rally.verification.tempest import subunit2json

LOG = logging.getLogger(__name__)

Expand Down
Empty file.
6 changes: 3 additions & 3 deletions tests/unit/benchmark/context/test_tempest.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@

from rally.benchmark.context import tempest
from rally import exceptions
from rally.verification.verifiers.tempest import config
from rally.verification.verifiers.tempest import tempest as tempest_verifier
from rally.verification.tempest import config
from rally.verification.tempest import tempest as tempest_verifier
from tests.unit import test


CONTEXT = "rally.benchmark.context.tempest"
TEMPEST = "rally.verification.verifiers.tempest.tempest"
TEMPEST = "rally.verification.tempest.tempest"


class TempestContextTestCase(test.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/benchmark/scenarios/tempest/test_tempest.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@
import mock

from rally.benchmark.scenarios.tempest import tempest
from rally.verification.verifiers.tempest import tempest as verifier
from rally.verification.tempest import tempest as verifier
from tests.unit import test

VERIFIER = "rally.verification.verifiers.tempest.tempest"
VERIFIER = "rally.verification.tempest.tempest"
TS = "rally.benchmark.scenarios.tempest"


Expand Down
2 changes: 1 addition & 1 deletion tests/unit/benchmark/test_validation.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from rally.benchmark import validation
from rally import consts
from rally import exceptions
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import tempest
from tests.unit import test


Expand Down
4 changes: 2 additions & 2 deletions tests/unit/cmd/commands/test_verify.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ def test_results_with_output_json_and_output_file(self,

@mock.patch("rally.cmd.commands.verify.open", create=True)
@mock.patch("rally.db.verification_result_get")
@mock.patch("rally.verification.verifiers.tempest.json2html.HtmlOutput")
@mock.patch("rally.verification.tempest.json2html.HtmlOutput")
def test_results_with_output_html_and_output_file(self,
mock_html,
mock_db_result_get,
Expand Down Expand Up @@ -267,7 +267,7 @@ def test_compare_with_output_json_and_output_file(self,

@mock.patch("rally.cmd.commands.verify.open", create=True)
@mock.patch("rally.db.verification_result_get")
@mock.patch(("rally.verification.verifiers.tempest."
@mock.patch(("rally.verification.tempest."
"compare2html.create_report"), return_value="")
def test_compare_with_output_html_and_output_file(self,
mock_compare2html_create,
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/cmd/test_manage.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def setUp(self):

@mock.patch("rally.cmd.manage.db.deployment_get",
return_value={"uuid": "e24b5af0-0e2a-4a70-9443-b30a88ab152e"})
@mock.patch("rally.verification.verifiers.tempest.tempest.Tempest")
@mock.patch("rally.verification.tempest.tempest.Tempest")
def test_install(self, mock_tempest, mock_d_get):
deployment_id = mock_d_get.return_value["uuid"]
mock_tempest.return_value = self.tempest
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/objects/test_verification.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

from rally import objects
from tests.unit import test
from tests.unit.verification.verifiers import fakes
from tests.unit.verification import fakes


class VerificationTestCase(test.TestCase):
Expand Down
4 changes: 2 additions & 2 deletions tests/unit/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ def test_recreate_deploy(self, mock_get, mock_update):

@mock.patch("rally.objects.Deployment.get")
@mock.patch("rally.api.objects.Verification")
@mock.patch("rally.verification.verifiers.tempest.tempest.Tempest")
@mock.patch("rally.verification.tempest.tempest.Tempest")
def test_verify(self, mock_tempest, mock_verification, mock_d_get):
mock_d_get.return_value = {"uuid": self.deploy_uuid}

Expand All @@ -238,7 +238,7 @@ def test_verify(self, mock_tempest, mock_verification, mock_d_get):

@mock.patch("rally.api.objects.Deployment.get")
@mock.patch("rally.api.objects.Verification")
@mock.patch("rally.verification.verifiers.tempest.tempest.Tempest")
@mock.patch("rally.verification.tempest.tempest.Tempest")
def test_verify_tempest_not_installed(self, mock_tempest,
mock_verification, mock_d_get):
mock_d_get.return_value = {"uuid": self.deploy_uuid}
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

import mock

from rally.verification.verifiers.tempest import compare2html
from rally.verification.tempest import compare2html
from tests.unit import test


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import mock
from oslo.config import cfg

from rally.verification.verifiers.tempest import config
from rally.verification.tempest import config
from tests.unit import fakes
from tests.unit import test

Expand All @@ -31,7 +31,7 @@ class ConfigTestCase(test.TestCase):
@mock.patch("rally.osclients.Clients.services",
return_value={"test_service_type": "test_service"})
@mock.patch("rally.osclients.Clients.verified_keystone")
@mock.patch("rally.verification.verifiers.tempest.config.os.path.isfile",
@mock.patch("rally.verification.tempest.config.os.path.isfile",
return_value=True)
def setUp(self, mock_isfile, mock_verified_keystone, mock_services,
mock_get):
Expand All @@ -57,8 +57,8 @@ def _remove_default_section(self, items):
("use_stderr", "False"))
return [item for item in items if item not in defaults]

@mock.patch("rally.verification.verifiers.tempest.config.requests")
@mock.patch("rally.verification.verifiers.tempest.config.os.rename")
@mock.patch("rally.verification.tempest.config.requests")
@mock.patch("rally.verification.tempest.config.os.rename")
@mock.patch("six.moves.builtins.open")
def test__load_img_success(self, mock_open, mock_rename, mock_requests):
mock_result = mock.MagicMock()
Expand All @@ -72,7 +72,7 @@ def test__load_img_success(self, mock_open, mock_rename, mock_requests):
CONF.image.cirros_image))
mock_requests.get.assert_called_once_with(cirros_url, stream=True)

@mock.patch("rally.verification.verifiers.tempest.config.requests")
@mock.patch("rally.verification.tempest.config.requests")
def test__load_img_notfound(self, mock_requests):
mock_result = mock.MagicMock()
mock_result.status_code = 404
Expand All @@ -93,7 +93,7 @@ def test__get_url(self):
}]}
self.assertEqual(self.conf_generator._get_url(service), url)

@mock.patch("rally.verification.verifiers.tempest.config.TempestConf"
@mock.patch("rally.verification.tempest.config.TempestConf"
"._get_url")
def test__set_boto(self, mock_get_url):
url = "test_url"
Expand Down Expand Up @@ -206,9 +206,9 @@ def test__set_compute_ssh_connect_method_if_neutron(self):
self.conf_generator.conf.get("compute",
"ssh_connect_method"))

@mock.patch("rally.verification.verifiers.tempest.config.os.path.exists",
@mock.patch("rally.verification.tempest.config.os.path.exists",
return_value=False)
@mock.patch("rally.verification.verifiers.tempest.config.os.makedirs")
@mock.patch("rally.verification.tempest.config.os.makedirs")
def test__set_default(self, mock_makedirs, mock_exists):
self.conf_generator._set_default()
lock_path = os.path.join(self.conf_generator.data_path, "lock_files_%s"
Expand Down Expand Up @@ -273,7 +273,7 @@ def test__set_network_if_nova(self, mock_nova):
self.conf_generator.conf.get("network",
"default_network"))

@mock.patch("rally.verification.verifiers.tempest.config.requests")
@mock.patch("rally.verification.tempest.config.requests")
def test__set_service_available(self, mock_requests):
mock_result = mock.MagicMock()
mock_result.status_code = 404
Expand All @@ -289,7 +289,7 @@ def test__set_service_available(self, mock_requests):
self.conf_generator.conf.items("service_available"))
self.assertEqual(sorted(expected), sorted(options))

@mock.patch("rally.verification.verifiers.tempest.config.requests")
@mock.patch("rally.verification.tempest.config.requests")
def test__set_service_available_horizon(self, mock_requests):
mock_result = mock.MagicMock()
mock_result.status_code = 200
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
from rally.verification.verifiers.tempest import diff
from rally.verification.tempest import diff
from tests.unit import test


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@

import mock

from rally.verification.verifiers.tempest import json2html
from rally.verification.tempest import json2html
from tests.unit import test

BASE = "rally.verification.verifiers.tempest"
BASE = "rally.verification.tempest"


class HtmlOutputTestCase(test.TestCase):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,12 @@
import testtools

from rally import exceptions
from rally.verification.verifiers.tempest import subunit2json
from rally.verification.verifiers.tempest import tempest
from rally.verification.tempest import subunit2json
from rally.verification.tempest import tempest
from tests.unit import test


TEMPEST_PATH = "rally.verification.verifiers.tempest"
TEMPEST_PATH = "rally.verification.tempest"


class BaseTestCase(test.TestCase):
Expand Down
Empty file.

0 comments on commit b3c832a

Please sign in to comment.