]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/src/app/shared/api/cephfs.service.spec.ts
update ceph source to reef 18.2.1
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / src / app / shared / api / cephfs.service.spec.ts
index 58395cd6705f6ca52fc2ea85f6f617d71956ded4..90fa98845b439649e507da5e23b30ec21934c7d0 100644 (file)
@@ -95,4 +95,20 @@ describe('CephfsService', () => {
     expect(req.request.method).toBe('PUT');
     expect(req.request.body).toEqual({ max_bytes: 1024, max_files: 10 });
   });
+
+  it('should rename the cephfs volume', () => {
+    const volName = 'testvol';
+    const newVolName = 'newtestvol';
+    service.rename(volName, newVolName).subscribe();
+    const req = httpTesting.expectOne('api/cephfs/rename');
+    expect(req.request.method).toBe('PUT');
+    expect(req.request.body).toEqual({ name: 'testvol', new_name: 'newtestvol' });
+  });
+
+  it('should remove the cephfs volume', () => {
+    const volName = 'testvol';
+    service.remove(volName).subscribe();
+    const req = httpTesting.expectOne(`api/cephfs/remove/${volName}`);
+    expect(req.request.method).toBe('DELETE');
+  });
 });