Skip to content
Snippets Groups Projects
Commit 1fdf518d authored by Takumaru Sekine's avatar Takumaru Sekine Committed by Yas Naoi
Browse files

Issue #3294451 by sekinet, yas, kumikoono: Add a BDD test suite for K8s API Services

parent 790f47fa
No related branches found
No related tags found
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!1163Issue #3294451: Add a BDD test suite for K8s API Services
@minimal @ci_job
Feature: Create, read and delete a API service for K8s as "Authenticated User"
@api @javascript
Scenario: Create a API service
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/api_service/add"
And I should see the heading "Add API service"
And I fill in "Detail" with:
"""
apiVersion: apiregistration.k8s.io/v1
kind: APIService
metadata:
name: {{api_service_name}}
spec:
insecureSkipTLSVerify: true
group: default.example.com
groupPriorityMinimum: 1000
versionPriority: 15
service:
name: api
namespace: default
version: v1alpha1
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/api_service"
And I should see the success message "has been created"
And I should see neither error nor warning messages
And I should see "{{api_service_name}}"
@api @javascript
Scenario: Read the API service
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/api_service"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{api_service_name}}"
And I click "{{api_service_name}}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/api_service/"
And I should see "{{api_service_name}}"
And I should see neither error nor warning messages
@api @javascript
Scenario: Delete the API service
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/api_service"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{api_service_name}}"
And I click "{{api_service_name}}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/api_service/"
And I click "Delete"
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 }}/api_service"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I click "Refresh"
And I should not see the link "{{api_service_name}}"
...@@ -253,3 +253,5 @@ namespace_annotations_item_value: ...@@ -253,3 +253,5 @@ namespace_annotations_item_value:
annotation_value_@random annotation_value_@random
namespace_annotations_item_value_field: namespace_annotations_item_value_field:
edit-annotations-1-item-value edit-annotations-1-item-value
api_service_name:
v1alpha1.default.example.com
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