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

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

Issue #3284365 by shota niioka, kumikoono, yas: Add a BDD test suite for K8s Secrets (Read and Update)
parent 8c4ba882
No related branches found
No related tags found
No related merge requests found
@minimal @ci_job
Feature: Create and delete a secret for K8s as "Authenticated User"
Feature: Create, read, update and delete a secret for K8s as "Authenticated User"
@api @javascript
Scenario: Create a secret
......@@ -8,15 +8,14 @@ Feature: Create and delete a secret for K8s as "Authenticated User"
And I should see the heading "Add Secret"
And I select "{{ namespace }}" from "Namespace"
And I fill in "Detail" with:
"""
apiVersion: v1
kind: Secret
metadata:
name: {{ secret_name }}
data:
username: {{ secret_key }}
password: {{ secret_value }}
"""
"""
apiVersion: v1
kind: Secret
metadata:
name: {{ secret_name }}
data:
username: {{ secret_key }}
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret"
......@@ -24,6 +23,48 @@ Feature: Create and delete a secret for K8s as "Authenticated User"
And I should see neither error nor warning messages
And I should see "{{ secret_name }}" in the "{{ namespace }}" row
@api @javascript
Scenario: Read the secret
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/secret"
And I click "Refresh"
And I should see the link "{{ secret_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ secret_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret/"
And I should see "{{ secret_name }}"
And I should see "{{ namespace }}"
And I should see neither error nor warning messages
@api @javascript
Scenario: Update the secret
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/secret"
And I click "Refresh"
And I should see the link "{{ secret_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ secret_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret/"
And I click "Edit"
And I fill in "Detail" with:
"""
apiVersion: v1
kind: Secret
metadata:
name: {{ secret_name }}
data:
username: {{ secret_key }}
password: {{ secret_value }}
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret"
And I should see the success message "has been updated"
And I should see neither error nor warning messages
And I click "{{ secret_name }}"
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret/"
And I should see "{{ secret_value }}"
@api @javascript
Scenario: Delete the secret
Given I am logged in as user "{{ user_name }}"
......@@ -32,11 +73,11 @@ Feature: Create and delete a secret for K8s as "Authenticated User"
And I should see the link "{{ secret_name }}"
And I wait {{ wait }} milliseconds
And I click "{{ secret_name }}"
And the url should match "/secret/"
Then the url should match "/clouds/k8s/{{ cloud_context }}/secret/"
And I click "Delete"
And the url should match "/delete"
And I press "Delete"
And I should be on "/clouds/k8s/{{ cloud_context }}/secret"
Then I should be on "/clouds/k8s/{{ cloud_context }}/secret"
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