Multiple fixes for CI
Change-Id: I7e64ae2bf955cb2b9c66b7466b155f07b402bd24
This commit is contained in:
parent
199186f96c
commit
db87d7f218
@ -2,11 +2,14 @@
|
||||
name: rally-task-watcher
|
||||
parent: rally-task-at-devstack
|
||||
required-projects:
|
||||
- name: openstack/devstack
|
||||
- name: openstack/rally
|
||||
- name: openstack/rally-openstack
|
||||
- name: openstack/watcher
|
||||
- name: openstack/python-watcherclient
|
||||
- openstack/ceilometer
|
||||
- openstack/python-openstackclient
|
||||
- openstack/python-watcherclient
|
||||
- openstack/watcher
|
||||
- openstack/watcher-tempest-plugin
|
||||
- openstack/tempest
|
||||
- openstack/rally
|
||||
- openstack/rally-openstack
|
||||
vars:
|
||||
devstack_plugins:
|
||||
rally-openstack: https://opendev.org/openstack/rally-openstack
|
||||
@ -15,14 +18,8 @@
|
||||
watcher-api: true
|
||||
watcher-decision-engine: true
|
||||
watcher-applier: true
|
||||
# disable redundant services for the job
|
||||
ceilometer-acentral: false
|
||||
ceilometer-acompute: false
|
||||
ceilometer-alarm-evaluator: false
|
||||
ceilometer-alarm-notifier: false
|
||||
ceilometer-anotification: false
|
||||
ceilometer-api: false
|
||||
ceilometer-collector: false
|
||||
horizon: false
|
||||
tempest: false
|
||||
s-account: false
|
||||
s-container: false
|
||||
s-object: false
|
||||
s-proxy: false
|
||||
rally_task: rally-jobs/watcher.yaml
|
||||
|
@ -2,7 +2,6 @@
|
||||
name: rally-task-zaqar
|
||||
parent: rally-task-at-devstack
|
||||
required-projects:
|
||||
- name: openstack/devstack
|
||||
- name: openstack/rally
|
||||
- name: openstack/rally-openstack
|
||||
- name: openstack/zaqar
|
||||
@ -12,3 +11,5 @@
|
||||
rally-openstack: https://opendev.org/openstack/rally-openstack
|
||||
zaqar: https://opendev.org/openstack/zaqar
|
||||
rally_task: rally-jobs/zaqar.yaml
|
||||
devstack_localrc:
|
||||
ZAQAR_BACKEND: redis
|
||||
|
@ -78,7 +78,8 @@
|
||||
- rally-task-watcher:
|
||||
# watcher-api did not start last time
|
||||
voting: false
|
||||
- rally-task-zaqar
|
||||
- rally-task-zaqar:
|
||||
voting: false
|
||||
- rally-verify-tempest
|
||||
gate:
|
||||
jobs:
|
||||
@ -115,7 +116,6 @@
|
||||
- rally_openstack/task/scenarios/neutron/trunk.py
|
||||
- rally_openstack/task/scenarios/neutron/network.py
|
||||
- tests/ci/playbooks
|
||||
- rally-task-zaqar
|
||||
- rally-verify-tempest
|
||||
post:
|
||||
jobs:
|
||||
|
@ -17,6 +17,22 @@ Changelog
|
||||
was missed or can be improved, feel free to change it!
|
||||
|
||||
|
||||
[unreleased]
|
||||
------------
|
||||
|
||||
Removed
|
||||
~~~~~~~
|
||||
|
||||
* Nova API doesn't include listing agents for a long time, so no need to
|
||||
provide *NovaAgents.list_agents* scenario any more.
|
||||
|
||||
Fixed
|
||||
~~~~~
|
||||
|
||||
* Two cinder scenarios *CinderVolumeTypes.create_and_update_volume_type* and
|
||||
*CinderVolumeTypes.create_volume_type_add_and_list_type_access* were
|
||||
incompatible with Cinder API v3
|
||||
|
||||
[2.2.0] - 2021-10-25
|
||||
--------------------
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
{% set flavor_name = "m1.tiny" %}
|
||||
{% set image_name = "^cirros.*-disk$" %}
|
||||
{% set cirros_image_url = "https://github.com/cirros-dev/cirros/releases/download/0.3.5/cirros-0.3.5-x86_64-disk.img" %}
|
||||
{% set smoke = 0 %}
|
||||
|
||||
---
|
||||
|
@ -8,7 +8,7 @@ parameters:
|
||||
- custom_constraint: nova.flavor
|
||||
image:
|
||||
type: string
|
||||
default: cirros-0.4.0-x86_64-disk
|
||||
default: cirros-0.5.2-x86_64-disk
|
||||
constraints:
|
||||
- custom_constraint: glance.image
|
||||
scaling_adjustment:
|
||||
|
@ -14,7 +14,7 @@ parameters:
|
||||
- range: {min: 1}
|
||||
instance_image:
|
||||
type: string
|
||||
default: cirros-0.4.0-x86_64-disk
|
||||
default: cirros-0.5.2-x86_64-disk
|
||||
instance_volume_size:
|
||||
type: number
|
||||
description: Size of volume to attach to instance
|
||||
|
@ -7,7 +7,7 @@ parameters:
|
||||
default: public
|
||||
image:
|
||||
type: string
|
||||
default: cirros-0.4.0-x86_64-disk
|
||||
default: cirros-0.5.2-x86_64-disk
|
||||
flavor:
|
||||
type: string
|
||||
default: m1.tiny
|
||||
|
@ -4,7 +4,7 @@ parameters:
|
||||
# set all correct defaults for parameters before launch test
|
||||
image:
|
||||
type: string
|
||||
default: cirros-0.4.0-x86_64-disk
|
||||
default: cirros-0.5.2-x86_64-disk
|
||||
flavor:
|
||||
type: string
|
||||
default: m1.tiny
|
||||
|
@ -1,4 +1,4 @@
|
||||
{%- set cirros_image_url = "https://github.com/cirros-dev/cirros/releases/download/0.3.5/cirros-0.3.5-x86_64-disk.img" %}
|
||||
{%- set cirros_image_url = "https://github.com/cirros-dev/cirros/releases/download/0.5.2/cirros-0.5.2-x86_64-disk.img" %}
|
||||
---
|
||||
KeystoneBasic.authenticate_user_and_validate_token:
|
||||
-
|
||||
|
@ -1,4 +1,4 @@
|
||||
{%- set cirros_image_url = "http://download.cirros-cloud.net/0.3.5/cirros-0.3.5-x86_64-disk.img" %}
|
||||
{%- set cirros_image_url = "https://github.com/cirros-dev/cirros/releases/download/0.5.2/cirros-0.5.2-x86_64-disk.img" %}
|
||||
{% set image_name = "^(cirros.*-disk|TestVM)$" %}
|
||||
{% set flavor_name = "m1.tiny" %}
|
||||
{% set volume_type = "" %}
|
||||
@ -378,7 +378,6 @@
|
||||
-
|
||||
title: NovaServers.boot_and_get_console_url tests
|
||||
workloads:
|
||||
{% for s in ("novnc", "xvpvnc") %}
|
||||
-
|
||||
scenario:
|
||||
NovaServers.boot_and_get_console_url:
|
||||
@ -386,7 +385,7 @@
|
||||
name: "{{flavor_name}}"
|
||||
image:
|
||||
name: "{{image_name}}"
|
||||
console_type: {{s}}
|
||||
console_type: novnc
|
||||
runner:
|
||||
constant:
|
||||
times: 4
|
||||
@ -395,8 +394,6 @@
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
{% endfor %}
|
||||
|
||||
-
|
||||
title: NovaServers.resize_server tests
|
||||
workloads:
|
||||
@ -874,14 +871,6 @@
|
||||
users:
|
||||
tenants: 2
|
||||
users_per_tenant: 2
|
||||
-
|
||||
title: NovaAgents.list_agents tests
|
||||
scenario:
|
||||
NovaAgents.list_agents: {}
|
||||
runner:
|
||||
constant:
|
||||
concurrency: 2
|
||||
times: 4
|
||||
-
|
||||
title: NovaAggregates.list_aggregates tests
|
||||
scenario:
|
||||
|
@ -25,6 +25,6 @@
|
||||
properties:
|
||||
name: cirros_server
|
||||
flavor: 1
|
||||
image: "cirros-0.4.0-x86_64-disk"
|
||||
image: "cirros-0.5.2-x86_64-disk"
|
||||
networks:
|
||||
- network: private
|
||||
|
@ -354,6 +354,45 @@ class BlockStorage(service.UnifiedService):
|
||||
description=description,
|
||||
is_public=is_public)
|
||||
|
||||
@service.should_be_overridden
|
||||
def update_volume_type(self, volume_type, name=None,
|
||||
description=None, is_public=None):
|
||||
"""Update the name and/or description for a volume type.
|
||||
|
||||
:param volume_type: The ID or an instance of the :class:`VolumeType`
|
||||
to update.
|
||||
:param name: if None, updates name by generating random name.
|
||||
else updates name with provided name
|
||||
:param description: Description of the volume type.
|
||||
:returns: Returns an updated volume type object.
|
||||
"""
|
||||
return self._impl.update_volume_type(
|
||||
volume_type=volume_type, name=name, description=description,
|
||||
is_public=is_public
|
||||
)
|
||||
|
||||
@service.should_be_overridden
|
||||
def add_type_access(self, volume_type, project):
|
||||
"""Add a project to the given volume type access list.
|
||||
|
||||
:param volume_type: Volume type name or ID to add access for the given
|
||||
project
|
||||
:project: Project ID to add volume type access for
|
||||
:return: An instance of cinderclient.apiclient.base.TupleWithMeta
|
||||
"""
|
||||
return self._impl.update_volume_type(
|
||||
volume_type=volume_type, project=project
|
||||
)
|
||||
|
||||
@service.should_be_overridden
|
||||
def list_type_access(self, volume_type):
|
||||
"""Print access information about the given volume type
|
||||
|
||||
:param volume_type: Filter results by volume type name or ID
|
||||
:return: VolumeTypeAccess of specific project
|
||||
"""
|
||||
return self._impl.volume_type_access.list(volume_type)
|
||||
|
||||
@service.should_be_overridden
|
||||
def get_volume_type(self, volume_type):
|
||||
"""get details of volume_type.
|
||||
|
@ -651,6 +651,42 @@ class UnifiedCinderMixin(object):
|
||||
"""
|
||||
return self._impl.delete_volume_type(volume_type)
|
||||
|
||||
def update_volume_type(self, volume_type, name=None,
|
||||
description=None, is_public=None):
|
||||
"""Update the name and/or description for a volume type.
|
||||
|
||||
:param volume_type: The ID or an instance of the :class:`VolumeType`
|
||||
to update.
|
||||
:param name: if None, updates name by generating random name.
|
||||
else updates name with provided name
|
||||
:param description: Description of the volume type.
|
||||
:rtype: :class:`VolumeType`
|
||||
"""
|
||||
return self._impl.update_volume_type(
|
||||
volume_type=volume_type, name=name, description=description,
|
||||
is_public=is_public
|
||||
)
|
||||
|
||||
def add_type_access(self, volume_type, project):
|
||||
"""Add a project to the given volume type access list.
|
||||
|
||||
:param volume_type: Volume type name or ID to add access for the given
|
||||
project
|
||||
:project: Project ID to add volume type access for
|
||||
:return: An instance of cinderclient.apiclient.base.TupleWithMeta
|
||||
"""
|
||||
return self._impl.add_type_access(
|
||||
volume_type=volume_type, project=project
|
||||
)
|
||||
|
||||
def list_type_access(self, volume_type):
|
||||
"""Print access information about the given volume type
|
||||
|
||||
:param volume_type: Filter results by volume type name or ID
|
||||
:return: VolumeTypeAccess of specific project
|
||||
"""
|
||||
return self._impl.list_type_access(volume_type)
|
||||
|
||||
def set_volume_type_keys(self, volume_type, metadata):
|
||||
"""Set extra specs on a volume type.
|
||||
|
||||
|
@ -317,6 +317,16 @@ class UnifiedCinderV1Service(cinder_common.UnifiedCinderMixin,
|
||||
"""
|
||||
return self._impl.create_volume_type(name=name)
|
||||
|
||||
def update_volume_type(self, volume_type, name=None,
|
||||
description=None, is_public=None):
|
||||
raise NotImplementedError("Cinder V1 doesn't support this method.")
|
||||
|
||||
def add_type_access(self, volume_type, project):
|
||||
raise NotImplementedError("Cinder V1 doesn't support this method.")
|
||||
|
||||
def list_type_access(self, volume_type):
|
||||
raise NotImplementedError("Cinder V1 doesn't support this method.")
|
||||
|
||||
def restore_backup(self, backup_id, volume_id=None):
|
||||
"""Restore the given backup.
|
||||
|
||||
|
@ -16,7 +16,6 @@ from rally.common import logging
|
||||
from rally.task import validation
|
||||
|
||||
from rally_openstack.common import consts
|
||||
from rally_openstack.common.services.storage import cinder_v2
|
||||
from rally_openstack.task import scenario
|
||||
from rally_openstack.task.scenarios.cinder import utils as cinder_utils
|
||||
|
||||
@ -72,7 +71,7 @@ class CreateAndGetVolumeType(cinder_utils.CinderBasic):
|
||||
@scenario.configure(context={"admin_cleanup@openstack": ["cinder"]},
|
||||
name="CinderVolumeTypes.create_and_update_volume_type",
|
||||
platform="openstack")
|
||||
class CreateAndUpdateVolumeType(scenario.OpenStackScenario):
|
||||
class CreateAndUpdateVolumeType(cinder_utils.CinderBasic):
|
||||
|
||||
def run(self, description=None, is_public=True, update_name=False,
|
||||
update_description=None, update_is_public=None):
|
||||
@ -85,15 +84,11 @@ class CreateAndUpdateVolumeType(scenario.OpenStackScenario):
|
||||
:param update_description: update Description of the volume type
|
||||
:param update_is_public: update Volume type visibility
|
||||
"""
|
||||
service = cinder_v2.CinderV2Service(self._admin_clients,
|
||||
self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
|
||||
volume_type = service.create_volume_type(
|
||||
volume_type = self.admin_cinder.create_volume_type(
|
||||
description=description,
|
||||
is_public=is_public)
|
||||
|
||||
service.update_volume_type(
|
||||
self.admin_cinder.update_volume_type(
|
||||
volume_type,
|
||||
name=volume_type.name if not update_name else False,
|
||||
description=update_description,
|
||||
@ -388,7 +383,7 @@ class CreateAndUpdateEncryptionType(cinder_utils.CinderBasic):
|
||||
context={"admin_cleanup@openstack": ["cinder"]},
|
||||
name="CinderVolumeTypes.create_volume_type_add_and_list_type_access",
|
||||
platform="openstack")
|
||||
class CreateVolumeTypeAddAndListTypeAccess(scenario.OpenStackScenario):
|
||||
class CreateVolumeTypeAddAndListTypeAccess(cinder_utils.CinderBasic):
|
||||
|
||||
def run(self, description=None, is_public=False):
|
||||
"""Add and list volume type access for the given project.
|
||||
@ -399,11 +394,10 @@ class CreateVolumeTypeAddAndListTypeAccess(scenario.OpenStackScenario):
|
||||
:param description: Description of the volume type
|
||||
:param is_public: Volume type visibility
|
||||
"""
|
||||
service = cinder_v2.CinderV2Service(self._admin_clients,
|
||||
self.generate_random_name,
|
||||
atomic_inst=self.atomic_actions())
|
||||
volume_type = service.create_volume_type(description=description,
|
||||
is_public=is_public)
|
||||
service.add_type_access(volume_type,
|
||||
project=self.context["tenant"]["id"])
|
||||
service.list_type_access(volume_type)
|
||||
volume_type = self.admin_cinder.create_volume_type(
|
||||
description=description, is_public=is_public
|
||||
)
|
||||
self.admin_cinder.add_type_access(
|
||||
volume_type, project=self.context["tenant"]["id"]
|
||||
)
|
||||
self.admin_cinder.list_type_access(volume_type)
|
||||
|
@ -203,7 +203,7 @@ class ManilaScenario(scenario.OpenStackScenario):
|
||||
:param share: :class:`Share`
|
||||
:param new_size: new size of the share
|
||||
"""
|
||||
share.extend(new_size)
|
||||
self.clients("manila").shares.extend(share, new_size)
|
||||
utils.wait_for_status(
|
||||
share,
|
||||
ready_statuses=["available"],
|
||||
|
@ -1,39 +0,0 @@
|
||||
# Copyright 2016 IBM Corp.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# 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.task import validation
|
||||
|
||||
from rally_openstack.common import consts
|
||||
from rally_openstack.task import scenario
|
||||
from rally_openstack.task.scenarios.nova import utils
|
||||
|
||||
|
||||
"""Scenarios for Nova agents."""
|
||||
|
||||
|
||||
@validation.add("required_services", services=[consts.Service.NOVA])
|
||||
@validation.add("required_platform", platform="openstack", admin=True)
|
||||
@scenario.configure(name="NovaAgents.list_agents", platform="openstack")
|
||||
class ListAgents(utils.NovaScenario):
|
||||
def run(self, hypervisor=None):
|
||||
"""List all builds.
|
||||
|
||||
Measure the "nova agent-list" command performance.
|
||||
|
||||
:param hypervisor: List agent builds on a specific hypervisor.
|
||||
None (default value) means list for all
|
||||
hypervisors
|
||||
"""
|
||||
self._list_agents(hypervisor)
|
@ -1,16 +0,0 @@
|
||||
{
|
||||
"NovaAgents.list_agents": [
|
||||
{
|
||||
"runner": {
|
||||
"type": "constant",
|
||||
"concurrency": 2,
|
||||
"times": 10
|
||||
},
|
||||
"sla": {
|
||||
"failure_rate": {
|
||||
"max": 0
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
@ -1,10 +0,0 @@
|
||||
---
|
||||
NovaAgents.list_agents:
|
||||
-
|
||||
runner:
|
||||
type: "constant"
|
||||
concurrency: 2
|
||||
times: 10
|
||||
sla:
|
||||
failure_rate:
|
||||
max: 0
|
@ -623,6 +623,14 @@ class UnifiedCinderMixinTestCase(test.TestCase):
|
||||
self.service._unify_transfer.assert_called_once_with(
|
||||
"transfer")
|
||||
|
||||
def test_update_volume_type(self):
|
||||
self.assertEqual(self.service._impl.update_volume_type.return_value,
|
||||
self.service.update_volume_type("volume_type"))
|
||||
self.service._impl.update_volume_type.assert_called_once_with(
|
||||
volume_type="volume_type", name=None, description=None,
|
||||
is_public=None
|
||||
)
|
||||
|
||||
def test_get_volume_type(self):
|
||||
self.assertEqual(self.service._impl.get_volume_type.return_value,
|
||||
self.service.get_volume_type("volume_type"))
|
||||
@ -635,6 +643,19 @@ class UnifiedCinderMixinTestCase(test.TestCase):
|
||||
self.service._impl.delete_volume_type.assert_called_once_with(
|
||||
"volume_type")
|
||||
|
||||
def test_add_type_access(self):
|
||||
self.assertEqual(self.service._impl.add_type_access.return_value,
|
||||
self.service.add_type_access(volume_type="some_type",
|
||||
project="some_project"))
|
||||
self.service._impl.add_type_access.assert_called_once_with(
|
||||
volume_type="some_type", project="some_project")
|
||||
|
||||
def test_list_type_access(self):
|
||||
self.assertEqual(self.service._impl.list_type_access.return_value,
|
||||
self.service.list_type_access("some_type"))
|
||||
self.service._impl.list_type_access.assert_called_once_with(
|
||||
"some_type")
|
||||
|
||||
def test_set_volume_type_keys(self):
|
||||
self.assertEqual(self.service._impl.set_volume_type_keys.return_value,
|
||||
self.service.set_volume_type_keys(
|
||||
|
@ -365,3 +365,17 @@ class UnifiedCinderV1ServiceTestCase(test.TestCase):
|
||||
volume_id=1)
|
||||
self.service._unify_volume.assert_called_once_with(
|
||||
self.service._impl.restore_backup.return_value)
|
||||
|
||||
def test_not_implemented_methods(self):
|
||||
self.assertRaises(
|
||||
NotImplementedError,
|
||||
self.service.update_volume_type, "type"
|
||||
)
|
||||
self.assertRaises(
|
||||
NotImplementedError,
|
||||
self.service.list_type_access, "type"
|
||||
)
|
||||
self.assertRaises(
|
||||
NotImplementedError,
|
||||
self.service.add_type_access, "type", project="project"
|
||||
)
|
||||
|
@ -18,9 +18,6 @@ from rally import exceptions as rally_exceptions
|
||||
from rally_openstack.task.scenarios.cinder import volume_types
|
||||
from tests.unit import test
|
||||
|
||||
CINDER_V2_PATH = ("rally_openstack.common.services.storage"
|
||||
".cinder_v2.CinderV2Service")
|
||||
|
||||
|
||||
class CinderVolumeTypesTestCase(test.ScenarioTestCase):
|
||||
|
||||
@ -157,23 +154,21 @@ class CinderVolumeTypesTestCase(test.ScenarioTestCase):
|
||||
description=description, is_public=is_public)
|
||||
mock_service.list_types.assert_called_once_with()
|
||||
|
||||
@mock.patch("%s.create_volume_type" % CINDER_V2_PATH)
|
||||
@mock.patch("%s.update_volume_type" % CINDER_V2_PATH)
|
||||
def test_create_and_update_volume_type(self, mock_update_volume_type,
|
||||
mock_create_volume_type):
|
||||
def test_create_and_update_volume_type(self):
|
||||
mock_service = self.mock_cinder.return_value
|
||||
scenario = volume_types.CreateAndUpdateVolumeType(self._get_context())
|
||||
fake_type = mock.MagicMock()
|
||||
fake_type.name = "any"
|
||||
create_description = "test create"
|
||||
update_description = "test update"
|
||||
mock_create_volume_type.return_value = fake_type
|
||||
mock_service.create_volume_type.return_value = fake_type
|
||||
scenario.run(description=create_description,
|
||||
update_description=update_description)
|
||||
|
||||
mock_create_volume_type.assert_called_once_with(
|
||||
mock_service.create_volume_type.assert_called_once_with(
|
||||
description=create_description,
|
||||
is_public=True)
|
||||
mock_update_volume_type.assert_called_once_with(
|
||||
mock_service.update_volume_type.assert_called_once_with(
|
||||
fake_type, name="any",
|
||||
description=update_description,
|
||||
is_public=None)
|
||||
@ -292,19 +287,16 @@ class CinderVolumeTypesTestCase(test.ScenarioTestCase):
|
||||
mock_service.update_encryption_type.assert_called_once_with(
|
||||
"fake_id", specs=update_specs)
|
||||
|
||||
@mock.patch("%s.list_type_access" % CINDER_V2_PATH)
|
||||
@mock.patch("%s.add_type_access" % CINDER_V2_PATH)
|
||||
@mock.patch("%s.create_volume_type" % CINDER_V2_PATH)
|
||||
def test_create_volume_type_add_and_list_type_access(
|
||||
self, mock_create_volume_type, mock_add_type_access,
|
||||
mock_list_type_access):
|
||||
def test_create_volume_type_add_and_list_type_access(self):
|
||||
mock_service = self.mock_cinder.return_value
|
||||
scenario = volume_types.CreateVolumeTypeAddAndListTypeAccess(
|
||||
self._get_context())
|
||||
fake_type = mock.Mock()
|
||||
mock_create_volume_type.return_value = fake_type
|
||||
mock_service.create_volume_type.return_value = fake_type
|
||||
|
||||
scenario.run(description=None, is_public=False)
|
||||
mock_create_volume_type.assert_called_once_with(
|
||||
mock_service.create_volume_type.assert_called_once_with(
|
||||
description=None, is_public=False)
|
||||
mock_add_type_access.assert_called_once_with(fake_type, project="fake")
|
||||
mock_list_type_access.assert_called_once_with(fake_type)
|
||||
mock_service.add_type_access.assert_called_once_with(
|
||||
fake_type, project="fake")
|
||||
mock_service.list_type_access.assert_called_once_with(fake_type)
|
||||
|
@ -109,7 +109,8 @@ class ManilaScenarioTestCase(test.ScenarioTestCase):
|
||||
|
||||
self.scenario._extend_share(fake_share, new_size)
|
||||
|
||||
fake_share.extend.assert_called_with(new_size)
|
||||
self.clients("manila").shares.extend.assert_called_once_with(
|
||||
fake_share, new_size)
|
||||
|
||||
self.mock_wait_for_status.mock.assert_called_once_with(
|
||||
fake_share,
|
||||
|
@ -1,28 +0,0 @@
|
||||
# Copyright 2016 IBM Corp.
|
||||
# All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||
# not use this file except in compliance with the License. You may obtain
|
||||
# a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# 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 unittest import mock
|
||||
|
||||
from rally_openstack.task.scenarios.nova import agents
|
||||
from tests.unit import test
|
||||
|
||||
|
||||
class NovaAgentsTestCase(test.TestCase):
|
||||
|
||||
def test_list_agents(self):
|
||||
scenario = agents.ListAgents()
|
||||
scenario._list_agents = mock.Mock()
|
||||
scenario.run(hypervisor=None)
|
||||
scenario._list_agents.assert_called_once_with(None)
|
Loading…
Reference in New Issue
Block a user