Kubernetes-client: Implement Regression/Integration tests for Kubernetes client

Created on 15 Dec 2017  路  4Comments  路  Source: fabric8io/kubernetes-client

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

Most helpful comment

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.

All 4 comments

@hrishin @iocanel Please share your thoughts on this.

@rohanKanojia
Few things when it comes to writing integration tests

  • Integration test cases looks similar to what unit tests are right now, it just that instead of mocking server its gonna test with real multiple version of OpenShift instances (v 3.6, 3.7).
  • Could you share the findings of some basic PoC of Arquillian? in terms of ease of writing the test case, overall reliability of assertions

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.

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sknot-rh picture sknot-rh  路  3Comments

zregvart picture zregvart  路  4Comments

jeffmaury picture jeffmaury  路  5Comments

rittneje picture rittneje  路  3Comments

yangjinlogic picture yangjinlogic  路  4Comments