Skip to content

Commit

Permalink
[issue 123] - Fixing the HelmChartOpenShiftProvisioner::undeploy, it …
Browse files Browse the repository at this point in the history
…must actually wait for no app pods to survive
  • Loading branch information
fabiobrz committed Dec 22, 2023
1 parent 0bc8aa3 commit 63a69fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,14 @@
*/
package org.jboss.intersmash.testsuite.provision.openshift;

import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.stream.Collectors;

import org.assertj.core.util.Strings;
import org.jboss.intersmash.deployments.IntersmashSharedDeploymentsProperties;
import org.jboss.intersmash.deployments.WildflyDeploymentApplicationConfiguration;
import org.jboss.intersmash.model.helm.charts.values.wildfly.Build;
import org.jboss.intersmash.model.helm.charts.values.wildfly.Deploy;
import org.jboss.intersmash.model.helm.charts.values.wildfly.Env;
import org.jboss.intersmash.model.helm.charts.values.eap8.HelmEap8Release;
import org.jboss.intersmash.model.helm.charts.values.wildfly.HelmWildflyRelease;
import org.jboss.intersmash.testsuite.IntersmashTestsuiteProperties;
Expand Down Expand Up @@ -67,11 +66,15 @@ private HelmChartRelease loadRelease(final WildflyHelmChartRelease release) {
.withSourceRepositoryUrl(IntersmashConfig.deploymentsRepositoryUrl())
.withSourceRepositoryRef(IntersmashConfig.deploymentsRepositoryRef())
.withContextDir("deployments/openshift-jakarta-sample-standalone")
// an example, not working with EAP 7.4.x or WildFly and commented in the deployment POM
.withS2iChannel(IntersmashConfig.getWildflyEeChannelLocation())
.withJdk17BuilderImage(IntersmashConfig.wildflyImageURL())
.withJdk17RuntimeImage(IntersmashConfig.wildflyRuntimeImageURL())
.withBuildEnvironmentVariable("MAVEN_ARGS_APPEND", mavenAdditionalArgs);
List<String> channelDefinition = Arrays.asList(this.eeChannelGroupId(), this.eeChannelArtifactId(),
this.eeChannelVersion());
if (!channelDefinition.isEmpty()) {
// an example of EAP channel usage, not working with EAP 7.4.x or WildFly
release.withS2iChannel(channelDefinition.stream().collect(Collectors.joining(":")));
}
return release;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public void deploy() {
@Override
public void undeploy() {
helmBinary.execute(getHelmChartUninstallArguments(this.getApplication().getName()));
OpenShiftWaiters.get(openShift, ffCheck).areExactlyNPodsReady(0, "app.kubernetes.io/instance", application.getName())
OpenShiftWaiters.get(openShift, ffCheck).areNoPodsPresent("app.kubernetes.io/instance", application.getName())
.level(Level.DEBUG)
.waitFor();
}
Expand Down

0 comments on commit 63a69fc

Please sign in to comment.