com.codacy.scoobydoo.kubernetes.KubernetesWrapperSpy Maven / Gradle / Ivy
package com.codacy.scoobydoo.kubernetes;
import io.fabric8.kubernetes.api.model.Pod;
import io.fabric8.kubernetes.client.KubernetesClient;
import io.fabric8.kubernetes.client.LocalPortForward;
import java.util.Map;
public class KubernetesWrapperSpy extends KubernetesWrapper {
public boolean firstRun;
public KubernetesWrapperSpy(KubernetesClient kubernetesClient) {
super(kubernetesClient);
this.firstRun = true;
}
public Map> getOpenPortForwards() {
return super.openPortForwards;
}
protected boolean testPortForwardCallback(LocalPortForward portForward) {
if (this.firstRun) {
this.firstRun = false;
return false;
}
return true;
}
}