@ -11,15 +11,16 @@
# See the License for the specific language governing permissions and
# limitations under the License.
from ironic_inspector . plugins import root_device_hint
from ironic_inspector . plugins import base
from ironic_inspector . plugins import raid_device
from ironic_inspector . test import base as test_base
class TestR ootDeviceHint ( test_base . NodeTest ) :
class TestR aidDeviceDetection ( test_base . NodeTest ) :
def setUp ( self ) :
super ( TestR ootDeviceHint , self ) . setUp ( )
self . hook = r oot_device_hint. RootDeviceHintHook ( )
super ( TestR aidDeviceDetection , self ) . setUp ( )
self . hook = r aid_device. RaidDeviceDetection ( )
def _before_update ( self , introspection_data ) :
node_patches = [ ]
@ -29,6 +30,14 @@ class TestRootDeviceHint(test_base.NodeTest):
self . assertFalse ( ports_patches )
return node_patches
def test_loadable_by_name ( self ) :
names = ( ' raid_device ' , ' root_device_hint ' )
base . CONF . set_override ( ' processing_hooks ' , ' , ' . join ( names ) ,
' processing ' )
for name in names :
ext = base . processing_hooks_manager ( ) [ name ]
self . assertIsInstance ( ext . obj , raid_device . RaidDeviceDetection )
def test_missing_local_gb ( self ) :
introspection_data = { }
self . hook . before_processing ( introspection_data )