Skip to content
Snippets Groups Projects
Commit 14d45eb0 authored by Tamaki Fujino's avatar Tamaki Fujino Committed by Yas Naoi
Browse files

Issue #3277765 by TamakiFujino, yas, kumikoono: Add a BDD test suite for CronJobs (Create)

parent 2f6374f5
Branches
Tags
3 merge requests!1316Issue #3310263: Release 4.5.0,!1260Issue #3307397: Release 4.4.0,!895Issue #3277765: Add a BDD test suite for CronJobs (1) (Create)
Feature: Create resources for K8s as "Authenticated User"
As a user
I need to create a CronJob
@api @javascript
Scenario: Create a CronJob
Given I am logged in as user "{{ user_name }}"
When I visit "/clouds/k8s/{{ cloud_context }}/cron_job/add"
And I should see the heading "Add CronJob"
And I select "{{ namespace }}" from "Namespace"
And I fill in "Detail" with:
"""
apiVersion: batch/v1beta1
kind: CronJob
metadata:
name: {{ cronjob_name }}
spec:
schedule: "* * * * *"
jobTemplate:
spec:
template:
spec:
containers:
- name: {{ container_name }}
image: {{ image_version }}
imagePullPolicy: IfNotPresent
command:
- /bin/sh
- -c
- date; echo Hello from the Kubernetes cluster
restartPolicy: OnFailure
"""
And I press "Save"
And I wait for AJAX to finish
Then the url should match "/clouds/k8s/{{ cloud_context }}/cron_job"
And I should see "has been created"
And I should see "{{ cronjob_name }}" in the "{{ namespace }}" row
......@@ -9,6 +9,8 @@ cloud_context:
bdd_k8s_@random
container_name:
nginx
cronjob_name:
bdd-cronjob-@random
deployment_name:
bdd-deployment-@random
image_version:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment