Skip to content

Commit 4947848

Browse files
authored
Merge pull request #70510 from opayne1/OSDOCS8973
OSDOCS#8973: Add test/invoke for functions in ODC to serverless docs
2 parents 89fd062 + fc5c202 commit 4947848

File tree

2 files changed

+33
-0
lines changed

2 files changed

+33
-0
lines changed

functions/serverless-functions-on-cluster-builds.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@ Instead of building a function locally, you can build a function directly on the
1111
include::modules/serverless-functions-creating-on-cluster-builds.adoc[leveloffset=+1]
1212
include::modules/serverless-functions-specifying-function-revision.adoc[leveloffset=+1]
1313
include::modules/serverless-functions-setting-custom-volume-size.adoc[leveloffset=+1]
14+
include::modules/odc-invoke-serverless-function.adoc[leveloffset=+1]
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * serverless/functions/serverless-functions-on-cluster-builds.adoc
4+
5+
:_mod-docs-content-type: PROCEDURE
6+
[id="odc-invoke-serverless-function_{context}"]
7+
= Testing a function in the web console
8+
9+
You can test a deployed serverless function by invoking it in the *Developer* perspective of the {product-title} web console.
10+
11+
.Prerequisites
12+
13+
* The {ServerlessOperatorName} and Knative Serving are installed on your {product-title} cluster.
14+
* You have logged in to the web console and are in the *Developer* perspective.
15+
* You have created and deployed a function.
16+
17+
.Procedure
18+
19+
. In the *Developer* perspective, navigate to *Topology*.
20+
21+
. Click on a function, then click *Test Serverless Function* from the *Actions* drop-down list in the *Details* panel. This opens the *Test Serverless Function* dialog box.
22+
23+
. In the *Test Serverless Function* dialog box, modify the settings for your test as required:
24+
25+
.. Choose the *Format* for your test. This can be either *CloudEvent* or *HTTP*.
26+
.. The *Content-Type* defaults to the `Content-Type` HTTP header value.
27+
.. You can use the *Advanced Settings* to modify the *Type* or *Source* for CloudEvent tests, or to add optional headers.
28+
.. You can modify the input data for the test.
29+
30+
. Click *Test* to run your test.
31+
. After the test is complete, the *Test Serverless Function* dialog box displays a status code and a message that informs you whether your test was succesful.
32+
. Click *Back* to perform another test, or *Close* to close the testing dialog box.

0 commit comments

Comments
 (0)