]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mgr/dashboard: Fix HomeTest setup
authorTiago Melo <tmelo@suse.com>
Tue, 12 May 2020 10:29:02 +0000 (10:29 +0000)
committerTiago Melo <tmelo@suse.com>
Tue, 12 May 2020 10:29:02 +0000 (10:29 +0000)
'setup_controllers' was being called outside of the fake fs mock,
so the tests would fail if there was no real dist folder.

Fixes: https://tracker.ceph.com/issues/45516
Signed-off-by: Tiago Melo <tmelo@suse.com>
src/pybind/mgr/dashboard/tests/test_home.py

index 2ec1b2ad764164a7188277caa153faff67d01758..c3088b7a6506ff57d986f482f2deaca335beeed1 100644 (file)
@@ -31,7 +31,7 @@ class HomeTest(ControllerTestCase, FakeFsMixin):
             cls.fs.create_file(
                 os.path.join(lang.DEFAULT_LANGUAGE_PATH, 'index.html'),
                 contents='<!doctype html><html lang="en"><body></body></html>')
-        cls.setup_controllers([HomeController])
+            cls.setup_controllers([HomeController])
 
     @mock.patch(FakeFsMixin.builtins_open, new=FakeFsMixin.f_open)
     @mock.patch('os.stat', new=FakeFsMixin.f_os.stat)