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

Issue #3281266 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s Services (Read)

parent 709048c5
No related branches found
No related tags found
No related merge requests found
@minimal @ci_job
Feature: Create and delete a service for K8s as "Authenticated User"
Feature: Create, read, update and delete a Service for K8s as "Authenticated User"
@api @javascript
Scenario: Create a service
Scenario: Create a Service
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/service/add"
And I should see the heading "Add Service"
And I select "{{ namespace }}" from "Namespace"
And I fill in "Detail" with:
"""
apiVersion: v1
kind: Service
metadata:
name: {{ service_name }}
spec:
selector:
app: {{ app_name }}
ports:
- protocol: {{ protocol }}
port: {{ port }}
targetPort: {{ target_port }}
"""
"""
apiVersion: v1
kind: Service
metadata:
name: {{ service_name }}
spec:
selector:
app: {{ app_name }}
ports:
- protocol: {{ protocol }}
port: {{ port }}
targetPort: {{ target_port }}
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "clouds/k8s/{{ cloud_context }}/service"
......@@ -28,6 +28,19 @@ Feature: Create and delete a service for K8s as "Authenticated User"
And I should see neither error nor warning messages
And I should see "{{ service_name }}" in the "{{ namespace }}" row
@api @javascript
Scenario: Read the service
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/service"
And I click "Refresh"
And I should see the link "{{ service_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ service_name }}"
Then the url should match "clouds/k8s/{{ cloud_context }}/service/"
And I should see "{{ service_name }}"
And I should see "{{ namespace }}"
And I should see neither error nor warning messages
@api @javascript
Scenario: Delete the service
Given I am logged in as user "{{ user_name }}"
......@@ -36,11 +49,11 @@ Feature: Create and delete a service for K8s as "Authenticated User"
And I should see the link "{{ service_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ service_name }}"
And the url should match "/service/"
Then the url should match "clouds/k8s/{{ cloud_context }}/service/"
And I click "Delete"
And the url should match "/delete"
And I press "Delete"
And I should be on "/clouds/k8s/{{ cloud_context }}/service"
Then I should be on "/clouds/k8s/{{ cloud_context }}/service"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I click "Refresh"
......
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