KubernetesClientUtil : Replace switch
with if
statement to improve readibility
#2677
Closed
1 of 2 tasks
Labels
Milestone
Component
JKube Kit
Task description
Description
KubernetesClientUtil seems to have this simple switch clause :
https://github.com/eclipse/jkube/blob/cc2c8a20c541c78c26f752058dc5bf334f74ff2b/jkube-kit/config/service/src/main/java/org/eclipse/jkube/kit/config/service/kubernetes/KubernetesClientUtil.java#L122-L128
As per Sonar rule S1301
There are no unit tests for this method, it would be nice to have two unit tests verifying both conditions.
Expected Behavior
The above code should be refactored to use if else statements.
Acceptance Criteria
How to manually test my changes
Kubernetes
If you don't have a real Kubernetes cluster available (most probably), you can use Minikube or Kind to test with a local cluster.
OpenShift
If you don't have a real OpenShift cluster available (most probably), you can use Red Hat's developer Sandbox for Red Hat OpenShift. The only requirement is to have a Red Hat account.
Once you have your Sandbox environment, you'll need to download the oc tool from the cluster console.
(Press the
?
icon and from the context menu selectCommand line tools
, you'll be redirected to https://$subdomain.openshiftapps.com/command-lines-tools where you'll be able to download the CLI for your platform)The text was updated successfully, but these errors were encountered: