Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
cloud
Merge requests
!1024
Issue
#3284361
: Add a BDD test suite for K8s Cluster Role (Read and Update)
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Issue
#3284361
: Add a BDD test suite for K8s Cluster Role (Read and Update)
issue/cloud-3284361:3284361-crole
into
5.x
Overview
0
Commits
1
Pipelines
0
Changes
1
Merged
shota niioka
requested to merge
issue/cloud-3284361:3284361-crole
into
5.x
3 years ago
Overview
0
Commits
1
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Compare
5.x
version 2
f1a858fa
3 years ago
version 1
a2cf5bb3
3 years ago
5.x (base)
and
latest version
latest version
cb20b738
1 commit,
3 years ago
version 2
f1a858fa
1 commit,
3 years ago
version 1
a2cf5bb3
1 commit,
3 years ago
1 file
+
57
−
14
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-24-OperateClusterRoles.feature
+
57
−
14
Options
@minimal
@ci_job
Feature
:
Create and delete a cluster role K8s as "Authenticated User"
Feature
:
Create
, read, update
and delete a cluster role K8s as "Authenticated User"
@api @javascript
Scenario
:
Create a cluster role
Given
I am logged in as user
"{{ user_name }}"
When
I visit
"/clouds/k8s/{{ cloud_context }}/cluster_role/add"
And I fill in "Detail" with
:
"""
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ cluster_role_name }}
rules:
- apiGroups: ["{{ role_api }}"]
resources: ["{{ role_resource }}"]
verbs: ["{{ role_verb }}"]
"""
"""
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ cluster_role_name }}
rules:
- apiGroups: ["{{ role_api }}"]
resources: ["{{ role_resource }}"]
verbs: ["{{ role_verb }}"]
"""
And
I press
"Save"
And
I wait for AJAX to finish
Then
the url should match
"/clouds/k8s/{{ cloud_context }}/cluster_role"
@@ -24,18 +24,61 @@ Feature: Create and delete a cluster role K8s as "Authenticated User"
And
I should see
"{{ cluster_role_name }}"
@api
@javascript
Scenario
:
Delete a
cluster role
Scenario
:
Read the
cluster role
Given
I am logged in as user
"{{ user_name }}"
When
I visit
"/clouds/k8s/{{ cloud_context }}/cluster_role"
And
I click
"Refresh"
And
I should see the link
"{{ cluster_role_name }}"
And
I wait {{ wait }} milliseconds
And
I click
"{{ cluster_role_name }}"
And
the url should match
"/cluster_role/"
Then
the url should match
"/clouds/k8s/{{ cloud_context }}/cluster_role/"
And
I should see
"{{ cluster_role_name }}"
And
I should see
"{{ role_resource }}"
And
I should see neither error nor warning messages
@api
@javascript
Scenario
:
Update the cluster role
Given
I am logged in as user
"{{ user_name }}"
When
I visit
"/clouds/k8s/{{ cloud_context }}/cluster_role"
And
I click
"Refresh"
And
I should see the link
"{{ cluster_role_name }}"
And
I wait {{ wait }} milliseconds
And
I click
"{{ cluster_role_name }}"
Then
the url should match
"/clouds/k8s/{{ cloud_context }}/cluster_role/"
And
I click
"Edit"
And I fill in "Detail" with
:
"""
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ cluster_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 }}/cluster_role"
And
I should see the success message
"has been updated"
And
I should see neither error nor warning messages
And
I click
"{{ cluster_role_name }}"
Then
the url should match
"/clouds/k8s/{{ cloud_context }}/cluster_role/"
And
I should see
"{{ role_verb_edit }}"
@api
@javascript
Scenario
:
Delete the cluster role
Given
I am logged in as user
"{{ user_name }}"
When
I visit
"/clouds/k8s/{{ cloud_context }}/cluster_role"
And
I click
"Refresh"
And
I should see the link
"{{ cluster_role_name }}"
And
I wait {{ wait }} milliseconds
And
I click
"{{ cluster_role_name }}"
Then
the url should match
"/clouds/k8s/{{ cloud_context }}/cluster_role/"
And
I click
"Delete"
And
the url should match
"/delete"
And
I press
"Delete"
And
I should be on
"/clouds/k8s/{{ cloud_context }}/cluster_role"
Then
I should be on
"/clouds/k8s/{{ cloud_context }}/cluster_role"
And
I should see the success message
"has been deleted"
And
I should see neither error nor warning messages
And
I click
"Refresh"
Loading