]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/ceph/nfs/nfs-details/nfs-details.component.spec.ts
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / ceph / nfs / nfs-details / nfs-details.component.spec.ts
index 3abae2ee88e999e82faf3ad1e4ceac5b93b1d894..fcf5305393cba5a345a07bab57369e11bafb3d48 100644 (file)
@@ -25,18 +25,15 @@ describe('NfsDetailsComponent', () => {
     fixture = TestBed.createComponent(NfsDetailsComponent);
     component = fixture.componentInstance;
 
-    component.selection = undefined;
     component.selection = {
       export_id: 1,
       path: '/qwe',
       fsal: { name: 'CEPH', user_id: 'fs', fs_name: 1 },
       cluster_id: 'cluster1',
-      daemons: ['node1', 'node2'],
       pseudo: '/qwe',
-      tag: 'asd',
       access_type: 'RW',
       squash: 'no_root_squash',
-      protocols: [3, 4],
+      protocols: [4],
       transports: ['TCP', 'UDP'],
       clients: [
         {
@@ -44,9 +41,7 @@ describe('NfsDetailsComponent', () => {
           access_type: 'RW',
           squash: 'root_id_squash'
         }
-      ],
-      id: 'cluster1:1',
-      state: 'LOADING'
+      ]
     };
     component.ngOnChanges();
     fixture.detectChanges();
@@ -62,8 +57,7 @@ describe('NfsDetailsComponent', () => {
       'CephFS Filesystem': 1,
       'CephFS User': 'fs',
       Cluster: 'cluster1',
-      Daemons: ['node1', 'node2'],
-      'NFS Protocol': ['NFSv3', 'NFSv4'],
+      'NFS Protocol': ['NFSv4'],
       Path: '/qwe',
       Pseudo: '/qwe',
       'Security Label': undefined,
@@ -77,7 +71,7 @@ describe('NfsDetailsComponent', () => {
     const newData = _.assignIn(component.selection, {
       fsal: {
         name: 'RGW',
-        rgw_user_id: 'rgw_user_id'
+        user_id: 'user-id'
       }
     });
     component.selection = newData;
@@ -85,9 +79,8 @@ describe('NfsDetailsComponent', () => {
     expect(component.data).toEqual({
       'Access Type': 'RW',
       Cluster: 'cluster1',
-      Daemons: ['node1', 'node2'],
-      'NFS Protocol': ['NFSv3', 'NFSv4'],
-      'Object Gateway User': 'rgw_user_id',
+      'NFS Protocol': ['NFSv4'],
+      'Object Gateway User': 'user-id',
       Path: '/qwe',
       Pseudo: '/qwe',
       Squash: 'no_root_squash',