]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/cluster/create-cluster/create-cluster-review.component.spec.ts
import quincy beta 17.1.0
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / cluster / create-cluster / create-cluster-review.component.spec.ts
index 3d9652be434ed6eb79cbc6a7a6c1be1c2a43ca92..94d3dd9d69d10b63a4c7c48dd0e3eb3cbae726d5 100644 (file)
@@ -3,11 +3,9 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
 
 import _ from 'lodash';
 import { ToastrModule } from 'ngx-toastr';
-import { of } from 'rxjs';
 
 import { CephModule } from '~/app/ceph/ceph.module';
 import { CoreModule } from '~/app/core/core.module';
-import { CephServiceService } from '~/app/shared/api/ceph-service.service';
 import { SharedModule } from '~/app/shared/shared.module';
 import { configureTestBed } from '~/testing/unit-test-helper';
 import { CreateClusterReviewComponent } from './create-cluster-review.component';
@@ -15,8 +13,6 @@ import { CreateClusterReviewComponent } from './create-cluster-review.component'
 describe('CreateClusterReviewComponent', () => {
   let component: CreateClusterReviewComponent;
   let fixture: ComponentFixture<CreateClusterReviewComponent>;
-  let cephServiceService: CephServiceService;
-  let serviceListSpy: jasmine.Spy;
 
   configureTestBed({
     imports: [HttpClientTestingModule, SharedModule, ToastrModule.forRoot(), CephModule, CoreModule]
@@ -25,31 +21,9 @@ describe('CreateClusterReviewComponent', () => {
   beforeEach(() => {
     fixture = TestBed.createComponent(CreateClusterReviewComponent);
     component = fixture.componentInstance;
-    cephServiceService = TestBed.inject(CephServiceService);
-    serviceListSpy = spyOn(cephServiceService, 'list');
   });
 
   it('should create', () => {
     expect(component).toBeTruthy();
   });
-
-  it('should verify host metadata calculations', () => {
-    const hostnames = ['ceph.test1', 'ceph.test2'];
-    const payload = [
-      {
-        hostname: hostnames[0],
-        service_type: ['mgr', 'mon']
-      },
-      {
-        hostname: hostnames[1],
-        service_type: ['mgr', 'alertmanager']
-      }
-    ];
-    serviceListSpy.and.callFake(() => of(payload));
-    fixture.detectChanges();
-    expect(serviceListSpy).toHaveBeenCalled();
-
-    expect(component.serviceCount).toBe(2);
-    expect(component.uniqueServices.size).toBe(2);
-  });
 });