Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example tests for Ambassador (API gateway) CRDs #63

Merged
merged 34 commits into from
Mar 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
27fac2c
add kw for getting configmaps, update docs
Nilsty Jul 17, 2020
1202294
adding example test case for configmap
Nilsty Jul 18, 2020
3b577aa
Merge remote-tracking branch 'upstream/master'
Nilsty Jul 25, 2020
4c46df8
Merge remote-tracking branch 'upstream/master'
Nilsty Aug 3, 2020
2b0610d
adding helm chart with k8s test objects
Nilsty Aug 3, 2020
6ae5eca
add get_jobs_in_namespace def
Nilsty Aug 3, 2020
8d74f5a
add Readme for test objects helm chart
Nilsty Aug 3, 2020
f23c46d
update main readme for test setup
Nilsty Aug 3, 2020
849f768
add watch=False for namespaced jobs
Nilsty Aug 3, 2020
d036745
add testcases for jobs
Nilsty Aug 3, 2020
1d3b424
update docs
Nilsty Aug 4, 2020
56c0373
Add keyword and tests for "Get Pod Logs"
Nilsty Aug 6, 2020
e545044
Merge pull request #1 from Nilsty/logs
Nilsty Aug 6, 2020
72605e8
Merge remote-tracking branch 'upstream/master'
Nilsty Aug 6, 2020
4c1fd3c
fix order in readme and remove accidental commit of conflict
Nilsty Aug 6, 2020
9a316a1
Merge branch 'master' of https://github.com/devopsspiral/KubeLibrary
Nilsty Aug 14, 2020
088c587
Merge branch 'master' of https://github.com/devopsspiral/KubeLibrary
Nilsty Aug 26, 2020
c55bab7
add example to connect to GKE cluster
Nilsty Aug 26, 2020
0026e9c
Merge branch 'master' of https://github.com/devopsspiral/KubeLibrary
Nilsty Sep 2, 2020
6699277
update docs with latest libdoc version
Nilsty Sep 2, 2020
4b3cfa3
Merge branch 'master' of https://github.com/devopsspiral/KubeLibrary
Nilsty Sep 14, 2020
34b5620
Merge remote-tracking branch 'upstream/master'
Nilsty Nov 10, 2020
c0a9e5b
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Feb 6, 2021
b5684a2
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Feb 7, 2021
ac71c77
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Feb 7, 2021
eb52df5
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Feb 8, 2021
d99a00e
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Feb 11, 2021
eed1203
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Mar 9, 2021
67d329d
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Mar 10, 2021
24c8b4b
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Mar 11, 2021
401e6a0
Merge branch 'master' of github.com:devopsspiral/KubeLibrary
Nilsty Mar 12, 2021
0ff3106
adding example tests for Ambassador CRDs
Nilsty Mar 12, 2021
44fc423
update changelog
Nilsty Mar 12, 2021
23fbcb5
update link to PR in chnagelog
Nilsty Mar 12, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
- Keyword for list cronjob [#48](https://github.com/devopsspiral/KubeLibrary/pull/48) by [@satish-nubolab](https://github.com/satish-nubolab)
- Keyword for list daemonset [#50](https://github.com/devopsspiral/KubeLibrary/pull/50) by [@satish-nubolab](https://github.com/satish-nubolab)
- Keyword for CustomObjectsApi [#54](https://github.com/devopsspiral/KubeLibrary/pull/54) by [@mika-b](https://github.com/mika-b)
- Example tests for Ambassador CRDs [#63](https://github.com/devopsspiral/KubeLibrary/pull/63) by [@Nilsty](https://github.com/Nilsty)


### Fixed
- Fix for cert validation disabling not being possible for all api clients [#61](https://github.com/devopsspiral/KubeLibrary/pull/61) by [@m-wcislo](https://github.com/m-wcislo)
Expand Down
33 changes: 33 additions & 0 deletions testcases/custom_objects/ambassador_crds.robot
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