Loading modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-09-OperatePersistentVolumes.feature 0 → 100644 +49 −0 Original line number Diff line number Diff line Feature: Create resources for K8s as "Authenticated User" As a user I need to create and delete a persistent volume @api @javascript Scenario: Create a persistent volume Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/persistent_volume/add" And I should see the heading "Add Persistent volume" And I fill in "Detail" with: """ kind: PersistentVolume apiVersion: v1 metadata: name: {{ persistentvolume_name }} spec: capacity: storage: {{ volume_capacity }} storageClassName: '' volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Delete hostPath: path: {{ volume_local_path }} """ And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I should see "has been created" And I should see "{{ persistentvolume_name }}" in the table @api @javascript Scenario: Delete the persistent volume Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ persistentvolume_name }}" And I click "{{ persistentvolume_name }}" And the url should match "/k8s/{{ cloud_context }}/persistent_volume/" And I click "Delete" in the "actions" And the url should match "/delete" And I press "Delete" And I wait for AJAX to finish Then I should be on "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I should see "has been deleted" And I click "Refresh" And I should not see the link "{{ persistentvolume_name }}" modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/params/k8s_params.yml +6 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ namespace: bdd-namespace-@random networkpolicy_name: bdd-np-@random persistentvolume_name: bdd-persistentvolume-@random pod_name: bdd-pod-@random port: Loading @@ -61,5 +63,9 @@ user_name: BDD_user_@Random user_password: BDD_pwd_@Random volume_capacity: 100Mi volume_local_path: /tmp/bdd_volume_@random wait: 500 Loading
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-09-OperatePersistentVolumes.feature 0 → 100644 +49 −0 Original line number Diff line number Diff line Feature: Create resources for K8s as "Authenticated User" As a user I need to create and delete a persistent volume @api @javascript Scenario: Create a persistent volume Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/persistent_volume/add" And I should see the heading "Add Persistent volume" And I fill in "Detail" with: """ kind: PersistentVolume apiVersion: v1 metadata: name: {{ persistentvolume_name }} spec: capacity: storage: {{ volume_capacity }} storageClassName: '' volumeMode: Filesystem accessModes: - ReadWriteOnce persistentVolumeReclaimPolicy: Delete hostPath: path: {{ volume_local_path }} """ And I press "Save" And I wait for AJAX to finish Then the url should match "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I should see "has been created" And I should see "{{ persistentvolume_name }}" in the table @api @javascript Scenario: Delete the persistent volume Given I am logged in as user "{{ user_name }}" When I visit "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I click "Refresh" And I wait {{ wait }} milliseconds And I should see the link "{{ persistentvolume_name }}" And I click "{{ persistentvolume_name }}" And the url should match "/k8s/{{ cloud_context }}/persistent_volume/" And I click "Delete" in the "actions" And the url should match "/delete" And I press "Delete" And I wait for AJAX to finish Then I should be on "/clouds/k8s/{{ cloud_context }}/persistent_volume" And I should see "has been deleted" And I click "Refresh" And I should not see the link "{{ persistentvolume_name }}"
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/params/k8s_params.yml +6 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,8 @@ namespace: bdd-namespace-@random networkpolicy_name: bdd-np-@random persistentvolume_name: bdd-persistentvolume-@random pod_name: bdd-pod-@random port: Loading @@ -61,5 +63,9 @@ user_name: BDD_user_@Random user_password: BDD_pwd_@Random volume_capacity: 100Mi volume_local_path: /tmp/bdd_volume_@random wait: 500