From 5f977920a6147aefd78caf1535f8cda9ca5df49b Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stephan=20M=C3=BCller?= Date: Wed, 9 Jan 2019 13:49:14 +0100 Subject: [PATCH] mgr/dashboard: RbdMirroringService test suite fails in dev mode MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit If you have set DEV in unit-test-configuration.ts to true, in order to run all unit tests much faster, the unit test suite of rbd mirroring service fails. The reason is, that it's expecting a call, that is triggered inside the constructor, which is only done once in for the copy used in the fast testing mode (if it would be done on within ngOnInit this wouldn't be a problem). Fixes: http://tracker.ceph.com/issues/37841 Signed-off-by: Stephan Müller --- .../src/app/shared/api/rbd-mirroring.service.spec.ts | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts index 905c5110bda..6432e187ce3 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts @@ -19,10 +19,13 @@ describe('RbdMirroringService', () => { } }; - configureTestBed({ - providers: [RbdMirroringService], - imports: [HttpClientTestingModule] - }); + configureTestBed( + { + providers: [RbdMirroringService], + imports: [HttpClientTestingModule] + }, + true + ); beforeEach(() => { service = TestBed.get(RbdMirroringService); -- 2.39.5