]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
mgr/dashboard: cephfs subvolume management e2e tests 53131/head
authorNizamudeen A <nia@redhat.com>
Fri, 18 Aug 2023 08:17:31 +0000 (13:47 +0530)
committerNizamudeen A <nia@redhat.com>
Thu, 24 Aug 2023 14:41:51 +0000 (20:11 +0530)
includes subvolume and subvolume groups e2es

Also taking care of renaming of Volume to File Systems in the remaining
actions like Edit and Remove

Fixes: https://tracker.ceph.com/issues/62564
Signed-off-by: Nizamudeen A <nia@redhat.com>
src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature
src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature [new file with mode: 0644]
src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts

index 560e8eef8f7d384f691bd7bf50a71ac023bc5471..79685299b93579c921eb71fedfbe2d5b2f8efa30 100644 (file)
@@ -9,7 +9,7 @@ Feature: CephFS Management
         Given I am on the "cephfs" page
         And I click on "Create" button
         And enter "name" "test_cephfs"
-        And I click on "Create Volume" button
+        And I click on "Create File System" button
         Then I should see a row with "test_cephfs"
 
     Scenario: Edit CephFS Volume
@@ -17,7 +17,7 @@ Feature: CephFS Management
         And I select a row "test_cephfs"
         And I click on "Edit" button
         And enter "name" "test_cephfs_edit" in the modal
-        And I click on "Edit Volume" button
+        And I click on "Edit File System" button
         Then I should see a row with "test_cephfs_edit"
 
     Scenario: Remove CephFS Volume
@@ -26,5 +26,5 @@ Feature: CephFS Management
         And I click on "Remove" button from the table actions
         Then I should see the modal
         And I check the tick box in modal
-        And I click on "Remove Volume" button
+        And I click on "Remove File System" button
         Then I should not see a row with "test_cephfs_edit"
diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature
new file mode 100644 (file)
index 0000000..66e3f72
--- /dev/null
@@ -0,0 +1,51 @@
+Feature: CephFS Subvolume Group management
+
+    Goal: To test out the CephFS subvolume group management features
+
+    Background: Login
+        Given I am logged in
+
+    Scenario: Create a CephFS Volume
+        Given I am on the "cephfs" page
+        And I click on "Create" button
+        And enter "name" "test_cephfs"
+        And I click on "Create File System" button
+        Then I should see a row with "test_cephfs"
+
+    Scenario: Create a CephFS Subvolume Group
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolume groups" tab
+        And I click on "Create" button from the expanded row
+        And enter "subvolumegroupName" "test_subvolume_group" in the modal
+        And I click on "Create Subvolume group" button
+        Then I should see a row with "test_subvolume_group" in the expanded row
+
+    Scenario: Edit a CephFS Subvolume
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolume groups" tab
+        When I select a row "test_subvolume_group" in the expanded row
+        And I click on "Edit" button from the table actions in the expanded row
+        And enter "size" "1" in the modal
+        And I click on "Edit Subvolume group" button
+        Then I should see row "test_subvolume_group" of the expanded row to have a usage bar
+
+    Scenario: Remove a CephFS Subvolume
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolume groups" tab
+        When I select a row "test_subvolume_group" in the expanded row
+        And I click on "Remove" button from the table actions in the expanded row
+        And I check the tick box in modal
+        And I click on "Remove subvolume group" button
+        Then I should not see a row with "test_subvolume_group" in the expanded row
+
+    Scenario: Remove CephFS Volume
+        Given I am on the "cephfs" page
+        And I select a row "test_cephfs"
+        And I click on "Remove" button from the table actions
+        Then I should see the modal
+        And I check the tick box in modal
+        And I click on "Remove File System" button
+        Then I should not see a row with "test_cephfs_edit"
diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature
new file mode 100644 (file)
index 0000000..792d157
--- /dev/null
@@ -0,0 +1,51 @@
+Feature: CephFS Subvolume management
+
+    Goal: To test out the CephFS subvolume management features
+
+    Background: Login
+        Given I am logged in
+
+    Scenario: Create a CephFS Volume
+        Given I am on the "cephfs" page
+        And I click on "Create" button
+        And enter "name" "test_cephfs"
+        And I click on "Create File System" button
+        Then I should see a row with "test_cephfs"
+
+    Scenario: Create a CephFS Subvolume
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolumes" tab
+        And I click on "Create" button from the expanded row
+        And enter "subvolumeName" "test_subvolume" in the modal
+        And I click on "Create Subvolume" button
+        Then I should see a row with "test_subvolume" in the expanded row
+
+    Scenario: Edit a CephFS Subvolume
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolumes" tab
+        When I select a row "test_subvolume" in the expanded row
+        And I click on "Edit" button from the table actions in the expanded row
+        And enter "size" "1" in the modal
+        And I click on "Edit Subvolume" button
+        Then I should see row "test_subvolume" of the expanded row to have a usage bar
+
+    Scenario: Remove a CephFS Subvolume
+        Given I am on the "cephfs" page
+        When I expand the row "test_cephfs"
+        And I go to the "Subvolumes" tab
+        When I select a row "test_subvolume" in the expanded row
+        And I click on "Remove" button from the table actions in the expanded row
+        And I check the tick box in modal
+        And I click on "Remove subvolume" button
+        Then I should not see a row with "test_subvolume" in the expanded row
+
+    Scenario: Remove CephFS Volume
+        Given I am on the "cephfs" page
+        And I select a row "test_cephfs"
+        And I click on "Remove" button from the table actions
+        Then I should see the modal
+        And I check the tick box in modal
+        And I click on "Remove File System" button
+        Then I should not see a row with "test_cephfs_edit"
index aa97a1918bb9167daef6be3cedca188af2c2ec55..280189ece620c929ded78c261f38873a3ece50b3 100644 (file)
@@ -132,7 +132,7 @@ export class CephfsListComponent extends ListWithDetails implements OnInit {
   removeVolumeModal() {
     const volName = this.selection.first().mdsmap['fs_name'];
     this.modalService.show(CriticalConfirmationModalComponent, {
-      itemDescription: 'Volume',
+      itemDescription: 'File System',
       itemNames: [volName],
       actionDescription: 'remove',
       submitActionObservable: () =>
@@ -146,7 +146,7 @@ export class CephfsListComponent extends ListWithDetails implements OnInit {
   getDisableDesc(): boolean | string {
     if (this.selection?.hasSelection) {
       if (!this.monAllowPoolDelete) {
-        return $localize`Volume deletion is disabled by the mon_allow_pool_delete configuration setting.`;
+        return $localize`File System deletion is disabled by the mon_allow_pool_delete configuration setting.`;
       }
 
       return false;
@@ -159,7 +159,7 @@ export class CephfsListComponent extends ListWithDetails implements OnInit {
     const selectedVolume = this.selection.first().mdsmap['fs_name'];
 
     this.modalService.show(FormModalComponent, {
-      titleText: $localize`Edit Volume: ${selectedVolume}`,
+      titleText: $localize`Edit File System: ${selectedVolume}`,
       fields: [
         {
           type: 'text',
@@ -169,12 +169,12 @@ export class CephfsListComponent extends ListWithDetails implements OnInit {
           required: true
         }
       ],
-      submitButtonText: $localize`Edit Volume`,
+      submitButtonText: $localize`Edit File System`,
       onSubmit: (values: any) => {
         this.cephfsService.rename(selectedVolume, values.name).subscribe(() => {
           this.notificationService.show(
             NotificationType.success,
-            $localize`Updated Volume '${selectedVolume}'`
+            $localize`Updated File System '${selectedVolume}'`
           );
         });
       }