diff options
author | Liam Fallon <liam.fallon@est.tech> | 2022-12-09 10:43:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2022-12-09 10:43:39 +0000 |
commit | 8554cbb864e32495214fd8287011868a832cc997 (patch) | |
tree | 51ca7cae964bb8bd4150d710c9a9c0f17fc1c7a3 /participant/participant-impl/participant-impl-kubernetes/src/main | |
parent | 4290f3f573dc430588965ebfe9f2b84d7840fbcb (diff) | |
parent | b68a2c490a0290b6c7451c28ae3528c1e9dbd3a6 (diff) |
Merge "Increase code coverage of k8s-participant module"
Diffstat (limited to 'participant/participant-impl/participant-impl-kubernetes/src/main')
2 files changed, 4 insertions, 2 deletions
diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java index f3f7d3427..a05dfbc5f 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/HelmClient.java @@ -143,7 +143,7 @@ public class HelmClient { * @return string output * @throws ServiceException incase of error. */ - public static String executeCommand(ProcessBuilder processBuilder) throws ServiceException { + public String executeCommand(ProcessBuilder processBuilder) throws ServiceException { var commandStr = toString(processBuilder); try { diff --git a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidator.java b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidator.java index 67bdc0b40..89eb284eb 100644 --- a/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidator.java +++ b/participant/participant-impl/participant-impl-kubernetes/src/main/java/org/onap/policy/clamp/acm/participant/kubernetes/helm/PodStatusValidator.java @@ -46,6 +46,8 @@ public class PodStatusValidator implements Runnable { private ChartInfo chart; + private HelmClient client = new HelmClient(); + /** * Constructor for PodStatusValidator. * @param chart chartInfo @@ -76,7 +78,7 @@ public class PodStatusValidator implements Runnable { long endTime = System.currentTimeMillis() + (timeout * 1000L); while (!isVerified && System.currentTimeMillis() < endTime) { - var output = HelmClient.executeCommand(verifyPodStatusCommand(chart)); + var output = client.executeCommand(verifyPodStatusCommand(chart)); var podStatusMap = mapPodStatus(output); isVerified = !podStatusMap.isEmpty() && podStatusMap.values().stream().allMatch("Running"::equals); |