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

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

Issue #3284360 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s Roles (Read and Update)
parent e2ec4e54
Branches
Tags
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!1023Issue #3284360: Add a BDD test suite for K8s Roles (Read and Update)
@minimal @ci_job
Feature: Create and delete a role resources K8s as "Authenticated User"
Feature: Create, read, update and delete a role resources K8s as "Authenticated User"
@api @javascript
Scenario: Create a role
......@@ -26,18 +26,61 @@ Feature: Create and delete a role resources K8s as "Authenticated User"
And I should see "{{ role_name}}" in the "{{ namespace }}" row
@api @javascript
Scenario: Delete a role
Scenario: Read the role
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/role"
And I click "Refresh"
And I should see the link "{{ role_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ role_name }}"
And the url should match "/role/"
Then the url should match "/clouds/k8s/{{ cloud_context }}/role/"
And I should see "{{ role_name }}"
And I should see "{{ namespace }}"
And I should see neither error nor warning messages
@api @javascript
Scenario: Update the role
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/role"
And I click "Refresh"
And I should see the link "{{ role_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ role_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/role/"
And I click "Edit"
And I fill in "Detail" with:
"""
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ role_name }}
rules:
- apiGroups: ["{{ role_api }}"]
resources: ["{{ role_resource }}"]
verbs: ["{{ role_verb_edit }}"]
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/role"
And I should see the success message "has been updated"
And I should see neither error nor warning messages
And I click "{{ role_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/role/"
And I should see "{{ role_verb_edit }}"
@api @javascript
Scenario: Delete the role
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/role"
And I click "Refresh"
And I should see the link "{{ role_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ role_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/role/"
And I click "Delete"
And the url should match "/delete"
And I press "Delete"
And I should be on "/clouds/k8s/{{ cloud_context }}/role"
Then I should be on "/clouds/k8s/{{ cloud_context }}/role"
And I should see the success message "has been deleted"
And I should see neither error nor warning messages
And I click "Refresh"
......
......@@ -145,6 +145,8 @@ role_resource:
deployments
role_verb:
get
role_verb_edit:
list
secret_name:
bdd-secret-@random
secret_key:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment