fabric8io / kubernetes-client

Java client for Kubernetes & OpenShift
http://fabric8.io
Apache License 2.0
3.35k stars 1.44k forks source link

Implement Regression/Integration tests for Kubernetes client #955

Closed rohanKanojia closed 6 years ago

rohanKanojia commented 6 years ago

Right now Kubernetes client lacks good test support. There are some unit tests but they are also very few, which use a mocked instance. It would be nice if we could have some real time tests, which would create resources on the fly and validate accordingly.

So in my opinion we should have one more test-suite which would check real time scenarios of using various resources like DeploymentsConfig, ConfigMap, Service etc on a running OpenShift cluster or maybe minishift. They don't need to be included as a part of a regular build, they could be added in a separate profile and can be invoked on CI only.

ref #1103

rohanKanojia commented 6 years ago

@hrishin @iocanel Please share your thoughts on this.

hrishin commented 6 years ago

@rohanKanojia Few things when it comes to writing integration tests

rohanKanojia commented 6 years ago

Hey @hrishin, Arquillian-Cube does a really good job in creating temporary namespaces and applying all Kubernetes resources to create a test environment. We don't need to worry about setting up the resources and cleanup up afterward.

iocanel commented 6 years ago

We can create a kubernetes-itests and openshift-itests module and use arquillian-cube, to write simple integration tests for it.

What would be really cool is to check if we could spin up different version of minikube or minishift in order to test the client against multiple versions.