Skip to content
Snippets Groups Projects
Commit 2a3b93e0 authored by makoto suzuki's avatar makoto suzuki Committed by makoto suzuki
Browse files

Issue #3279817: Add a BDD test suite for K8s launching a template (Create) (Git)

parent 3e47daed
No related branches found
Tags 7.16
No related merge requests found
Feature: Create resources for K8s as "Authenticated User"
As a user
I need to create a deployment
@api
Scenario: Log into the site
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds"
Then I should see the heading "Cloud service providers"
And I should see the link "All" in the "nav_bar"
And I should see the link "K8s" in the "nav_bar"
@api @javascript
Scenario: Create a Launch template(git)
Given I am logged in as user "{{ user_name }}"
When I visit "clouds/design/server_template/{{ cloud_context }}/k8s/add"
And I enter "{{ launch_repository_git }}" for "Git repository"
And I wait for AJAX to finish
And I wait "{{ wait }}" milliseconds
And I enter "{{ launch_name_git }}" for "Name"
And I select "{{ namespace }}" from "Namespace"
And I click "{{ launch_configuration_git }}"
And I select "{{ launch_source_type_git }}" from "Source type"
And I enter "{{ launch_resource_path_git }}" for "Git resource path"
And I select "{{ launch_workflow_status1 }}" from "Workflow status"
And I select "{{ launch_branch_or_tag_git }}" from "Git branch or tag"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/design/server_template/{{ cloud_context }}"
And I should see "{{ launch_name_git }} has been created"
@api @javascript
Scenario: change workflow status Launch template(git)
Given I am logged in as a user with the "Cloud administrator" role
When I visit "/clouds/design/server_template/{{ cloud_context }}"
And I click "Edit" in the "{{ launch_name_git }}" row
And the url should match "/edit"
And I select "{{ namespace }}" from "Namespace"
And I select "Approved" from "Workflow status"
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/design/server_template/{{ cloud_context }}"
And I should see "{{ launch_name_git }} has been updated"
@api @javascript
Scenario: Launch a Launch template(git)
Given I am logged in as a user with the "Cloud administrator" role
When I visit "/clouds/design/server_template/{{ cloud_context }}"
And I click "{{ launch_name_git }}"
And I click "Launch"
And I press "Launch"
And I wait for AJAX to finish
Then the url should match "/clouds/design/server_template/{{ cloud_context }}"
And I should see "{{ launch_deployment1_git }} has been launched"
And I should see "{{ launch_deployment2_git }} has been launched"
And I should see "{{ launch_pod1_git }} has been launched"
@api @javascript
Scenario: Check Launch template deployment(git)
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/deployment"
And I should see "{{ namespace }}" in the "{{ launch_deployment1_git }}" row
And I should see "{{ namespace }}" in the "{{ launch_deployment2_git }}" row
@api @javascript
Scenario: Check Launch template pod(git)
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/pod"
And I should see "{{ namespace }}" in the "{{ launch_pod1_git }}" row
......@@ -53,6 +53,28 @@ k8s_cloud_service_provider_name_entered:
k8s_cloud_service_provider_name:
# In k8s, this is the same as k8s_cloud_service_provider_name_entered.
BDD_K8s_@Random
launch_workflow_status1:
Draft
launch_workflow_status2:
Approved
launch_name_git:
BDD_launch_git_@Random
launch_configuration_git:
GIT
launch_source_type_git:
Git
launch_repository_git:
https://github.com/naoi/cloud_orchestrator.git
launch_branch_or_tag_git:
5.x
launch_resource_path_git:
/examples
launch_deployment1_git:
cowsay-deployment
launch_deployment2_git:
nginx-deployment
launch_pod1_git:
cowsay-pod
limitrange_name:
bdd-limitrange-@random
max_cpu:
......
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