]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/dashboard-v3/pg-summary.pipe.spec.ts
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / dashboard-v3 / pg-summary.pipe.spec.ts
1 import { TestBed } from '@angular/core/testing';
2
3 import { configureTestBed } from '~/testing/unit-test-helper';
4 import { PgCategoryService } from '../shared/pg-category.service';
5 import { PgSummaryPipe } from './pg-summary.pipe';
6
7 describe('OsdSummaryPipe', () => {
8 let pipe: PgSummaryPipe;
9
10 configureTestBed({
11 providers: [PgSummaryPipe, PgCategoryService]
12 });
13
14 beforeEach(() => {
15 pipe = TestBed.inject(PgSummaryPipe);
16 });
17
18 it('create an instance', () => {
19 expect(pipe).toBeTruthy();
20 });
21
22 it('tranforms value', () => {
23 const value = {
24 statuses: {
25 'active+clean': 241
26 },
27 pgs_per_osd: 241
28 };
29 expect(pipe.transform(value)).toEqual({
30 categoryPgAmount: {
31 clean: 241
32 },
33 total: 241
34 });
35 });
36 });