Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
cloud-3356780
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
Issue forks
cloud-3356780
Commits
b9c65848
Commit
b9c65848
authored
2 years ago
by
shota niioka
Committed by
Yas Naoi
2 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-05-OperateServices.feature
+30
-17
30 additions, 17 deletions
...features/templates/K8s-ATDD-02-05-OperateServices.feature
with
30 additions
and
17 deletions
modules/cloud_service_providers/k8s/tests/src/Behat/features/templates/K8s-ATDD-02-05-OperateServices.feature
+
30
−
17
View file @
b9c65848
@minimal
@ci_job
Feature
:
Create and delete a
s
ervice for K8s as "Authenticated User"
Feature
:
Create
, read, update
and delete a
S
ervice for K8s as "Authenticated User"
@api @javascript
Scenario
:
Create a
s
ervice
Scenario
:
Create a
S
ervice
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"
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment