]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/rbd-mirroring.service.spec.ts
import 15.2.5
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / rbd-mirroring.service.spec.ts
index 37be86346dd0cca9112bf8facdb5fa2adc7fc086..2efa5a7998517549d6a052bcbac23768b6b83b9d 100644 (file)
@@ -27,13 +27,10 @@ describe('RbdMirroringService', () => {
     executing_tasks: [{}]
   };
 
-  configureTestBed(
-    {
-      providers: [RbdMirroringService],
-      imports: [HttpClientTestingModule]
-    },
-    true
-  );
+  configureTestBed({
+    providers: [RbdMirroringService],
+    imports: [HttpClientTestingModule]
+  });
 
   beforeEach(() => {
     service = TestBed.get(RbdMirroringService);
@@ -62,7 +59,7 @@ describe('RbdMirroringService', () => {
     const subs = service.startPolling();
     tick();
     const calledWith: any[] = [];
-    service.subscribeSummary((data: any) => {
+    service.subscribeSummary((data) => {
       calledWith.push(data);
     });
     tick(service.REFRESH_INTERVAL * 2);
@@ -70,23 +67,11 @@ describe('RbdMirroringService', () => {
 
     expect(calls.length).toEqual(3);
     calls.forEach((call: TestRequest) => flushCalls(call));
-    expect(calledWith).toEqual([null, summary]);
+    expect(calledWith).toEqual([summary]);
 
     subs.unsubscribe();
   }));
 
-  it('should get current summary', () => {
-    service.refresh();
-    const calledWith: any[] = [];
-    service.subscribeSummary((data: any) => {
-      calledWith.push(data);
-    });
-    const calls = getMirroringSummaryCalls();
-    calls.forEach((call: TestRequest) => flushCalls(call));
-
-    expect(service.getCurrentSummary()).toEqual(summary);
-  });
-
   it('should get pool config', () => {
     service.getPool('poolName').subscribe();