Skip to content
Snippets Groups Projects
Commit d08de6fb authored by Tomohiro Ono's avatar Tomohiro Ono Committed by Yas Naoi
Browse files

Issue #3280064 by onotm, kumikoono, yas: Add a BDD test suite for K8s Service...

Issue #3280064 by onotm, kumikoono, yas: Add a BDD test suite for K8s Service Accounts (Create and Delete)
parent 6165e675
No related branches found
No related tags found
No related merge requests found
Feature: Create resources for K8s as "Authenticated User"
As a user
I need to create and delete a service account
@api @javascript
Scenario: Create a service account
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/service_account/add"
And I should see the heading "Add ServiceAccount"
And I select "{{ namespace }}" from "Namespace"
And I fill in "Detail" with:
"""
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ serviceaccount_name }}
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/service_account"
And I should see "has been created"
And I should see "{{ serviceaccount_name }}" in the "{{ namespace }}" row
@api @javascript
Scenario: Delete the service account
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/service_account"
And I click "Refresh"
And I wait {{ wait }} milliseconds
And I should see the link "{{ serviceaccount_name }}"
And I click "{{ serviceaccount_name }}"
And the url should match "/k8s/{{ cloud_context }}/service_account/"
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 }}/service_account"
And I should see "has been deleted"
And I click "Refresh"
And I should not see the link "{{ serviceaccount_name }}"
......@@ -77,6 +77,8 @@ secret_value:
Mzk1MjgkdmRnN0pi
service_name:
bdd-service-@random
serviceaccount_name:
bdd-serviceaccount-@random
statefulset_name:
bdd-statefulset-@random
storageclass_name:
......
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