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: [
{
access_type: 'RW',
squash: 'root_id_squash'
}
- ],
- id: 'cluster1:1',
- state: 'LOADING'
+ ]
};
component.ngOnChanges();
fixture.detectChanges();
'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,
const newData = _.assignIn(component.selection, {
fsal: {
name: 'RGW',
- rgw_user_id: 'rgw_user_id'
+ user_id: 'user-id'
}
});
component.selection = newData;
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',