From: Nizamudeen A Date: Fri, 18 Aug 2023 08:17:31 +0000 (+0530) Subject: mgr/dashboard: cephfs subvolume management e2e tests X-Git-Tag: v18.2.1~342^2 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=260a62a8957e8cd85470ef5efb224f5547a303e2;p=ceph-ci.git mgr/dashboard: cephfs subvolume management e2e tests 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 (cherry picked from commit b2c00675f412925b3d83f23b1dd6391af07ca7ea) --- diff --git a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature index 560e8eef8f7..79685299b93 100644 --- a/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/filesystems.e2e-spec.feature @@ -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 index 00000000000..66e3f726a66 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolume-groups.e2e-spec.feature @@ -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 index 00000000000..792d1571d92 --- /dev/null +++ b/src/pybind/mgr/dashboard/frontend/cypress/e2e/filesystems/subvolumes.e2e-spec.feature @@ -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" diff --git a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts index aa97a1918bb..280189ece62 100644 --- a/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts +++ b/src/pybind/mgr/dashboard/frontend/src/app/ceph/cephfs/cephfs-list/cephfs-list.component.ts @@ -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}'` ); }); }