devopsspiral / KubeLibrary

Kubernetes library for Robot Framework
MIT License
138 stars 37 forks source link

Add support for CRD list and read #108

Open siaomingjeng opened 2 years ago

siaomingjeng commented 2 years ago

Currently there is no support for custom resource definition. We need at least add list and read, in order to test whether the required CRD exists for many test cases.

siaomingjeng commented 2 years ago

Anybody can help with below checks?

Error: INSTALLATION FAILED: unable to build kubernetes objects from release manifest: resource mapping not found for name: "grafana" namespace: "" from "": no matches for kind "PodSecurityPolicy" in version "extensions/v1beta1"
ensure CRDs are installed first
............Env var "SECRET_NAME" value "wrong" not matching actual "webhook-server-secret"
Env var "NOT_EXISTING" not found in actual
Failed parsing Container Env Var JSON:{"badlyformatted:}
.Annotation "checksum/config" value "wrong" not matching actual "1c42968a1b9eca0bafc3273ca39c4705fe71dc632e721db9e8ce44ab1b8e1428"
Annotation "notexists" not found in actual
Failed parsing Pod Annotations JSON:{"badlyformatted:}
.Label "app" value "wrong" not matching actual "octopus"
Label "notexists" not found in actual
Failed parsing Pod Labels JSON:{"badlyformatted:}
......s.................................
----------------------------------------------------------------------
Ran 54 tests in 0.410s

OK (skipped=1)
Name                             Stmts   Miss  Cover
----------------------------------------------------
src/KubeLibrary/KubeLibrary.py     441     66    85%
src/KubeLibrary/__init__.py          1      0   100%
src/KubeLibrary/exceptions.py        5      0   100%
src/KubeLibrary/version.py           1      0   100%
----------------------------------------------------
TOTAL                              448     66    85%
Coverage failure: total of 85 is less than fail-under=86

Exited with code exit status 2