After adding content, you can test
your content in a staging environment. You test content to ensure that it is ready for
release.
The following procedure shows how to
test content obtained from a vRealize Orchestrator endpoint.Procedure
-
Assign the reference ID of an
existing vRealize Orchestrator endpoint to a variable name.
vROEndpoint = '<referenceID>'
-
To test your captured content in a
staging environment, execute the following command. This example uses a
vRealize Orchestrator endpoint as a unit test server to perform basic
pre-defined tests on content, so its endpoint ID is specified for the
unitTestEndpointID
.
curl -X POST \
'$url/lcm/cms/api/v1/contents/pipelines' \
-H 'Accept: application/json' \
-H 'Authorization: Basic YWRtaW5AbG9jYWw6VGhpc0lzUGFzc3dvcmQ=' \
-H 'Content-Type: application/json' \
-d '{
"stages": [
{
"comment": "bjbhbj",
"endpointIds": ["0a712e24-14ce-4aa9-aeb6-3651a7480a3b"],
"tagNames": [],
"contents": [],
"contentVersionIds": ["2ebc459f-617a-4470-9108-1df61aaa269c"],
"stage": "TEST",
"deployLatest": true,
"includeDependencies": true,
"stopUnitTestsOnFirstFailure": true,
"stopDeployOnFirstFailure": true,
"enableUnitTests": true,
"enableDeploy": true,
"deployAllFiles": true,
"unitTestEndpointId": "{$vROEndpoint}"
}
]
}'| jq "."
-
To track the status of the
request, examine the response.
{
"requestId":"f8951a41-b811-4645-81bb-3eb1b09a25cc",
"status":"IN_PROGRESS"
}