|
10 | 10 | # License for the specific language governing permissions and limitations
|
11 | 11 | # under the License.
|
12 | 12 |
|
13 |
| -from nova import test |
14 | 13 | from nova.tests.fixtures import libvirt as fakelibvirt
|
15 | 14 | from nova.tests.functional.libvirt import test_vgpu
|
16 | 15 |
|
@@ -47,73 +46,7 @@ def setUp(self):
|
47 | 46 |
|
48 | 47 | self.start_compute_with_vgpu('host1')
|
49 | 48 |
|
50 |
| - def fake_nodeDeviceLookupByName(self, name): |
51 |
| - # See bug https://bugs.launchpad.net/nova/+bug/2098892 |
52 |
| - # We don't test this by importing the libvirt module because the |
53 |
| - # libvirt module is forbidden to be imported into our test |
54 |
| - # environment. It is excluded from test-requirements.txt and we |
55 |
| - # also use the ImportModulePoisonFixture in nova/test.py to prevent |
56 |
| - # use of modules such as libvirt. |
57 |
| - if not isinstance(name, str) and name is not None: |
58 |
| - raise TypeError( |
59 |
| - 'virNodeDeviceLookupByName() argument 2 must be str or ' |
60 |
| - f'None, not {type(name)}') |
61 |
| - |
62 |
| - # FIXME(melwitt): We need to patch this only for this test because if |
63 |
| - # we add it to the LibvirtFixture right away, it will cause the |
64 |
| - # following additional tests to fail: |
65 |
| - # |
66 |
| - # nova.tests.functional.libvirt.test_reshape.VGPUReshapeTests |
67 |
| - # test_create_servers_with_vgpu |
68 |
| - # |
69 |
| - # nova.tests.functional.libvirt.test_vgpu.DifferentMdevClassesTests |
70 |
| - # test_create_servers_with_different_mdev_classes |
71 |
| - # test_resize_servers_with_mlx5 |
72 |
| - # |
73 |
| - # nova.tests.functional.libvirt.test_vgpu.VGPULimitMultipleTypesTests |
74 |
| - # test_create_servers_with_vgpu |
75 |
| - # |
76 |
| - # nova.tests.functional.libvirt.test_vgpu.VGPULiveMigrationTests |
77 |
| - # test_live_migrate_server |
78 |
| - # test_live_migration_fails_on_old_source |
79 |
| - # test_live_migration_fails_due_to_non_supported_mdev_types |
80 |
| - # test_live_migration_fails_on_old_destination |
81 |
| - # |
82 |
| - # nova.tests.functional.libvirt. |
83 |
| - # test_vgpu.VGPULiveMigrationTestsLMFailed |
84 |
| - # test_live_migrate_server |
85 |
| - # test_live_migration_fails_on_old_source |
86 |
| - # test_live_migration_fails_due_to_non_supported_mdev_types |
87 |
| - # test_live_migration_fails_on_old_destination |
88 |
| - # |
89 |
| - # nova.tests.functional.libvirt.test_vgpu.VGPUMultipleTypesTests |
90 |
| - # test_create_servers_with_specific_type |
91 |
| - # test_create_servers_with_vgpu |
92 |
| - # |
93 |
| - # nova.tests.functional.libvirt.test_vgpu.VGPUTests |
94 |
| - # test_multiple_instance_create |
95 |
| - # test_create_servers_with_vgpu |
96 |
| - # test_create_server_with_two_vgpus_isolated |
97 |
| - # test_resize_servers_with_vgpu |
98 |
| - # |
99 |
| - # nova.tests.functional.libvirt.test_vgpu.VGPUTestsLibvirt7_3 |
100 |
| - # test_create_servers_with_vgpu |
101 |
| - # test_create_server_with_two_vgpus_isolated |
102 |
| - # test_resize_servers_with_vgpu |
103 |
| - # test_multiple_instance_create |
104 |
| - # |
105 |
| - # nova.tests.functional.regressions. |
106 |
| - # test_bug_1951656.VGPUTestsLibvirt7_7 |
107 |
| - # test_create_servers_with_vgpu |
108 |
| - self.stub_out( |
109 |
| - 'nova.tests.fixtures.libvirt.Connection.nodeDeviceLookupByName', |
110 |
| - fake_nodeDeviceLookupByName) |
111 |
| - |
112 | 49 | def test_update_available_resource(self):
|
113 | 50 | # We only want to verify no errors were logged by
|
114 | 51 | # update_available_resource (logging under the 'except Exception:').
|
115 |
| - # FIXME(melwitt): This currently will log an error and traceback |
116 |
| - # because of the bug. Update this when the bug is fixed. |
117 |
| - e = self.assertRaises( |
118 |
| - test.TestingException, self._run_periodics, raise_on_error=True) |
119 |
| - self.assertIn('TypeError', str(e)) |
| 52 | + self._run_periodics(raise_on_error=True) |
0 commit comments