]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: fix "NullInjectorError: No provider for I18n 45613/head
authorNizamudeen A <nia@redhat.com>
Thu, 24 Mar 2022 08:01:18 +0000 (13:31 +0530)
committerNizamudeen A <nia@redhat.com>
Thu, 24 Mar 2022 08:01:18 +0000 (13:31 +0530)
Although I am not sure what's the root cause of this but this seems to
fix the test failure. I don't know if this is caused by the differnce in
angular versions between master and octopus but I still don't understand
why it didn't catch in the recent PR to this file (https://github.com/ceph/ceph/pull/44763)

Fixes: https://tracker.ceph.com/issues/55011
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/src/app/shared/components/pwd-expiration-notification/pwd-expiration-notification.component.spec.ts

index fee50e43c4d03097b69f52fcb44e42b995dea8c4..9761a412231297b76aeaa37d0500160c51eff2e4 100644 (file)
@@ -8,7 +8,7 @@ import { of as observableOf } from 'rxjs';
 
 import { AlertModule } from 'ngx-bootstrap/alert';
 
-import { configureTestBed } from '../../../../testing/unit-test-helper';
+import { configureTestBed, i18nProviders } from '../../../../testing/unit-test-helper';
 
 import { SettingsService } from '../../api/settings.service';
 import { AlertPanelComponent } from '../../components/alert-panel/alert-panel.component';
@@ -38,7 +38,7 @@ describe('PwdExpirationNotificationComponent', () => {
       HttpClientTestingModule,
       RouterTestingModule.withRoutes(routes)
     ],
-    providers: [SettingsService, AuthStorageService]
+    providers: [SettingsService, AuthStorageService, i18nProviders]
   });
 
   describe('password expiration date has been set', () => {