From: Stephan Müller Date: Wed, 8 Jan 2020 17:06:07 +0000 (+0100) Subject: mgr/dashboard: Added missing types in CephFS directories spec X-Git-Tag: v15.1.1~322^2~2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=977343286239de8ba61d15e12d3256d462d9f36e;p=ceph.git mgr/dashboard: Added missing types in CephFS directories spec Fixes: https://tracker.ceph.com/issues/42617 Signed-off-by: Stephan Müller --- diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts index 894cfa08ba7..1d1fd66e774 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-directories/cephfs-directories.component.spec.ts @@ -112,7 +112,7 @@ describe('CephfsDirectoriesComponent', () => { mockLib.dir(path, 'b', 2) ]; }, - lsDir: (_id: number, path = '') => { + lsDir: (_id: number, path = ''): Observable => { // will return 2 levels deep let data = mockLib.lsSingleDir(path); const paths = data.map((dir) => dir.path); @@ -121,7 +121,7 @@ describe('CephfsDirectoriesComponent', () => { }); return of(data); }, - mkSnapshot: (_id: any, path: string, name: string) => { + mkSnapshot: (_id: any, path: string, name: string): Observable => { mockData.createdSnaps.push({ name, path, @@ -129,7 +129,7 @@ describe('CephfsDirectoriesComponent', () => { }); return of(name); }, - rmSnapshot: (_id: any, path: string, name: string) => { + rmSnapshot: (_id: any, path: string, name: string): Observable => { mockData.deletedSnaps.push({ name, path, @@ -137,11 +137,11 @@ describe('CephfsDirectoriesComponent', () => { }); return of(name); }, - updateQuota: (_id: any, path: string, updated: CephfsQuotas) => { + updateQuota: (_id: any, path: string, updated: CephfsQuotas): Observable => { mockData.updatedQuotas[path] = Object.assign(mockData.updatedQuotas[path] || {}, updated); return of('Response'); }, - modalShow: (comp: any, init: any) => { + modalShow: (comp: Type, init: any): any => { modal = modalServiceShow(comp, init); return modal.ref; }, @@ -834,10 +834,7 @@ describe('CephfsDirectoriesComponent', () => { describe('table actions', () => { let actions: CdTableAction[]; - const empty = (): CdTableSelection => { - const selection = new CdTableSelection(); - return selection; - }; + const empty = (): CdTableSelection => new CdTableSelection(); const select = (value: number): CdTableSelection => { const selection = new CdTableSelection();