Kubernetes library for Robot Framework
Project description
KubeLibrary
RobotFramework library for testing Kubernetes cluster
Quick start
# install library itself
pip install robotframework-kubelibrary
# export KUBECONFIG
export KUBECONFIG=~/.kube/config
# run example tests
pip install robotframework-requests
git clone https://github.com/devopsspiral/KubeLibrary.git
cd KubeLibrary
robot testcases
Example testcase
Pods in kube-system are ok
[Documentation] Test if all pods in kube-system initiated correctly and are running or succeeded
[Tags] cluster smoke
Given kubernetes API responds
When getting pods in "kube-system"
Then all pods in "kube-system" are running or succeeded
Grafana has correct version
[Documentation] Test if Grafana container image is in correct version
[Tags] grafana
Given kubernetes API responds
When accessing "grafana-" excluding "svclb" container images version in "default"
Then "grafana/grafana:6.5.0" version is used
More examples in testcases/ directory.
Keywords documentation
Keywords documentation can be found in docs/.
Further reading
DevOps spiral article on KubeLibrary
Development
# clone repo
git clone https://github.com/devopsspiral/KubeLibrary.git
cd KubeLibrary
# create virtualenv
virtualenv .venv
. .venv/bin/activate
pip install -r requirements
Create keyword and test file, import KubeLibrary using below to point to library under development.
| ***** Settings ***** |
| Library ../src/KubeLibrary/KubeLibrary.py |
For development cluster you can use k3s/k3d as described in DevOps spiral article on K3d and skaffold. To see all the tests passing you can also install Grafana using
helm install grafana stable/grafana -f testcases/grafana/values.yaml
Generate docs
python -m robot.libdoc src/KubeLibrary/KubeLibrary.py docs/KubeLibrary.html
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for robotframework-kubelibrary-0.1.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbf55e2a1fcdcbc8647fbb467440ed9758e03835c9051d27dad0704f50e235b5 |
|
MD5 | 52ebdefa546cebac3a47629e4697e356 |
|
BLAKE2b-256 | 0d6ea567754c07b200ee86d38a53081a942e80da96c8037fb3d37d2e3bdbce82 |
Close
Hashes for robotframework_kubelibrary-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ad75bc2287fa5e671320a84cad53a2f40e087a0dd84b4b44565841f94643eeb |
|
MD5 | cad6e080d56aabd0b78aee09262695c0 |
|
BLAKE2b-256 | 29f1348e96a8873ea743d9792bfbbc54425fa995570cf3d123df11ee8936845c |