-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Example tests for Ambassador (API gateway) CRDs (#63)
adding example tests for Ambassador CRDs
- Loading branch information
Showing
2 changed files
with
35 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
*** Settings *** | ||
Library KubeLibrary | ||
|
||
Documentation These are example test cases to check custom resource definitions created by Ambassador. | ||
... Ambassador is on open source API gateway solution. The most common CRDs created by ambassador | ||
... are Mappings and Hosts, which control the routing of API requests to different services | ||
... running in your cluster. | ||
... https://www.getambassador.io/products/api-gateway/ | ||
... More details on Ambassador Mappings: | ||
... https://www.getambassador.io/docs/pre-release/topics/using/intro-mappings/#introduction-to-the-mapping-resource | ||
*** Test Cases *** | ||
Get details for all ambassador mappings | ||
${listed_mappings}= List Cluster Custom Objects getambassador.io v2 mappings | ||
FOR ${mapping} IN @{listed_mappings['items']} | ||
Log Mapping name: ${mapping}[metadata][name] console=True | ||
Log Mapping namespace: ${mapping}[metadata][namespace] console=True | ||
Log Mapping prefix: ${mapping}[spec][prefix] console=True | ||
Log Mapping service: ${mapping}[spec][service] console=True | ||
${status}= Run Keyword And Ignore Error Log Mapping status: ${mapping}[status][state] console=True | ||
Run Keyword If '''FAIL''' in '''${status}''' Log ! Mapping ${mapping}[metadata][name] is not running console=True | ||
Log --------------------------------------------------- console=True | ||
END | ||
|
||
Get details for all ambassador hosts | ||
${listed_hosts}= List Cluster Custom Objects getambassador.io v2 hosts | ||
FOR ${host} IN @{listed_hosts['items']} | ||
Log Host name: ${host}[metadata][name] console=True | ||
Log Host namespace: ${host}[metadata][namespace] console=True | ||
Log Host hostname: ${host}[spec][hostname] console=True | ||
Log Host status: ${host}[status][state] console=True | ||
Log --------------------------------------------------- console=True | ||
END |