Skip to content
Snippets Groups Projects
Commit 3241894c authored by shota niioka's avatar shota niioka Committed by Yas Naoi
Browse files

Issue #3284363 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s...

Issue #3284363 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s storage class (Read and Update)
parent 5fe52823
No related branches found
No related tags found
No related merge requests found
@minimal @ci_job
Feature: Create and delete a storage class for K8s as "Authenticated User"
Feature: Create, read, update and delete a storage class for K8s as "Authenticated User"
@api @javascript
Scenario: Create a storage class
......@@ -13,14 +13,14 @@ Feature: Create and delete a storage class for K8s as "Authenticated User"
kind: StorageClass
metadata:
name: {{ storage_class_name }}
provisioner: kubernetes.io/aws-ebs
provisioner: {{ storage_class_provisioner }}
parameters:
type: gp3
reclaimPolicy: Delete
allowVolumeExpansion: false
type: {{ storage_class_type }}
reclaimPolicy: {{ storage_class_policy }}
allowVolumeExpansion: {{ storage_class_expansion }}
mountOptions:
- debug
volumeBindingMode: Immediate
- {{ storage_class_options }}
volumeBindingMode: {{ storage_class_mode }}
"""
And I press "Save"
And I wait for AJAX to finish
......@@ -29,6 +29,55 @@ Feature: Create and delete a storage class for K8s as "Authenticated User"
And I should see neither error nor warning messages
And I should see "{{ storage_class_name }}" in the table
@api @javascript
Scenario: Read the storage class
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/storage_class"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ storage_class_name }}"
And I click "{{ storage_class_name }}"
Then the url should match "/k8s/{{ cloud_context }}/storage_class/"
And I should see "{{ storage_class_name }}"
And I should see "{{ storage_class_type }}"
And I should see neither error nor warning messages
@api @javascript
Scenario: Update the storage class
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/storage_class"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ storage_class_name }}"
And I click "{{ storage_class_name }}"
Then the url should match "/k8s/{{ cloud_context }}/storage_class/"
And I click "Edit"
And I fill in "Detail" with:
"""
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
name: {{ storage_class_name }}
labels:
app: {{ app_name }}
provisioner: {{ storage_class_provisioner }}
parameters:
type: {{ storage_class_type }}
reclaimPolicy: {{ storage_class_policy }}
allowVolumeExpansion: {{ storage_class_expansion }}
mountOptions:
- {{ storage_class_options }}
volumeBindingMode: {{ storage_class_mode }}
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/k8s/{{ cloud_context }}/storage_class"
And I should see the success message "has been updated"
And I should see neither error nor warning messages
And I click "{{ storage_class_name }}"
Then the url should match "/k8s/{{ cloud_context }}/storage_class/"
And I should see "{{ app_name }}"
@api @javascript
Scenario: Delete the storage class
Given I am logged in as user "{{ user_name }}"
......
......@@ -149,8 +149,20 @@ serviceaccount_name:
bdd-serviceaccount-@random
statefulset_name:
bdd-statefulset-@random
storage_class_expansion:
false
storage_class_mode:
Immediate
storage_class_name:
bdd-storage-class-@random
storage_class_options:
debug
storage_class_policy:
Delete
storage_class_provisioner:
kubernetes.io/aws-ebs
storage_class_type:
gp3
target_port:
9376
type:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment