forked from openshift/console
-
Notifications
You must be signed in to change notification settings - Fork 0
/
serverless-function.feature
160 lines (137 loc) · 9.3 KB
/
serverless-function.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
@knative-serverless
Feature: Creation and Visualisation of serverless fuctions
As a user, I want to create and verify a serverless function from Add Options and I should be able to differentiate between a plain Knative Service and a Serverless Function when looking at the Details page of the KSVC and the details tab of the side panel in Topology.
Background:
Given user is at developer perspective
And user has created or selected namespace "aut-serverless-function"
@regression @manual
Scenario: Visualize serverless function in topology chart view: SF-01-TC01
Given user has created serverless function "nodetest"
And user is at Topology list page
When user clicks on Topology chart view
Then user will see name of the serverless function as fx label followed by KSVC label and name "nodetest"
And user will not see git and build decorator associated with the function
@regression @manual
Scenario: Visualize serverless function in topology list view: SF-01-TC02
Given user has created serverless function "nodetest"
And user is at Topology chart page
When user clicks on Topology list view
Then user will see name of the serverless function as KSVC label followed by fx label and name "nodetest"
@regression @manual
Scenario: Sidebar of serverless function: SF-01-TC03
Given user has created serverless function "nodetest"
And user is at Topology chart page
When user clicks on "nodetest"
Then user will see type as "Functions" mentioned in the Details tab of sidebar
And user will see Labels as boson.dev/function=true and boson.dev/runtime=node
@regression @manual
Scenario: Service details page of serverless function: SF-01-TC04
Given user has created serverless function "nodetest"
And user is at Topology chart page
When user clicks on "nodetest"
And user clicks on heading "nodetest" in the sidebar
Then user will see type as "Functions" mentioned in the Details tab of Service details page of "nodetest"
And user will see Labels as boson.dev/function=true and boson.dev/runtime=node in Details tab
@regression @odc-7167
Scenario Outline: Create Serverless Function from Import From Git Form on Add page with Builder Images: SF-01-TC05
Given user is at Add page
And user is at Import from Git form
When user enters Git Repo URL as "<git_url>"
And user enters Name as "<workload_name>"
And user clicks Create button on Add page
Then user will be redirected to Topology page
And user clicks on Topology list view
And user will see name of the serverless function as KSVC label followed by fx label and name "<workload_name>"
Examples:
| git_url | workload_name |
| https://github.com/Lucifergene/serverless-func-repo | serverless-func-repo |
@regression @odc-7167
Scenario Outline: Create serverless function using Create Serverless function form with Builder Images: SF-01-TC06
Given user is at Add page
When user clicks on Create Serverless function card
And user enters git url "<git_url>"
And user is able to see builder image version dropdown
And user is able to see the runtime details
And user clicks on Create button on Create Serverless function
Then user will be redirected to Topology page
And user is able to see workload "<workload_name>" in topology page
And user clicks on the Knative Service workload "<workload_name>"
And user switches to the "Details" tab
And user is able to see Type as Function
Examples:
| git_url | workload_name |
| https://github.com/vikram-raj/hello-func-node-env | hello-func-node-env |
@regression @odc-6360
Scenario Outline: Create Serverless Function from the Import from Git Form on Add page with Pipeline: SF-01-TC07
Given user has installed OpenShift Pipelines Operator
# Below manual creation of the Piepline and ClusterTasks can be removed when Serverless new version 1.28 is released
And user created Serverless Function node Pipeline
And user is at Add page
And user is at Import from Git form
When user enters Git Repo URL as "<git_url>"
And user enters Name as "<workload_name>"
And user selects Add Pipeline checkbox in Pipelines section
And user clicks Create button on Add page
And user clicks on List view button
Then user is able to see workload "<workload_name>" in topology page
And user clicks on the Knative Service workload "<workload_name>"
And user switches to the "Details" tab
And user is able to see Type as Function
And user is able to see PipelineRuns in the "Resources" tab
Examples:
| git_url | workload_name |
| https://github.com/vikram-raj/hello-func-node | import-form-hello-func-node-pipeline |
@regression @odc-6360
Scenario Outline: Create serverless function using Create Serverless function form with Pipeline: SF-01-TC08
Given user is at Add page
When user clicks on Create Serverless function card
And user enters git url "<git_url>"
And user is able to see builder image version dropdown
And user is able to see the runtime details
And user enters Name as "<workload_name>"
And user selects Add Pipeline checkbox in Pipelines section
And user clicks on Create button on Create Serverless function
Then user will be redirected to Topology page
And user is able to see workload "<workload_name>" in topology page
And user clicks on the Knative Service workload "<workload_name>"
And user switches to the "Details" tab
And user is able to see Type as Function
And user is able to see PipelineRuns in the "Resources" tab
Examples:
| git_url | workload_name |
| https://github.com/vikram-raj/hello-func-node | create-serverless-function-form-hello-func-node-pipeline |
@regression @odc-6360
Scenario Outline: Pipeline section should not present in Create Serverless function form if Pipeline is not available: SF-01-TC09
Given user has installed OpenShift Pipelines Operator
And user is at Add page
When user clicks on Create Serverless function card
And user enters git url "<git_url>"
And user enters Name as "<workload_name>"
Then user is not able to see Add Pipeline checkbox
Examples:
| git_url | workload_name |
| https://github.com/vikram-raj/hello-func-quarkus | hello-func-quarkus |
@regression @odc-7275
Scenario Outline: Test Serverless Functions: SF-01-TC10
Given user is at Add page
When user clicks on Create Serverless function card
And user enters git url "<git_url>"
And user clicks on Create button on Create Serverless function
And user sees workload "<workload_name>" along with a revision in topology page
And user clicks on the Knative Service workload "<workload_name>"
And user selects option "Test Serverless Function" from Actions menu
And user sees the Test Serverless Function modal
And user selects "<invoke_format>" from the Format drop down field
And user clicks on the "Advanced Settings" option
And user enters the "demo.fn" in the Type field
And user enters the "/demo/fn" in the Source field
And user clicks on Add optional headers and enter "Auth" under Name and "true" under Value
And user pastes the "request-body" code in "<invoke_format>" in the editor
And user clicks the "Test" Button
Then user is able to see a Success Alert
And user is able to see the Response Body as "response-body" code for the "<invoke_format>" format
And user clicks the "Close" Button
Examples:
| git_url | workload_name | invoke_format |
| https://github.com/openshift-dev-console/kn-func-typescript-http | kn-func-typescript-http | HTTP |
| https://github.com/openshift-dev-console/kn-func-typescript-cloudevents | kn-func-typescript-cloudevents | CloudEvent |