Skip to content

Commit

Permalink
Don't run Kubernetes manifest generation in tests
Browse files Browse the repository at this point in the history
In tests, various Build Items are population with the
proper values (like the output target), so it's best
to not run the Kubernetes manifest generation at all
in order to avoid getting NPEs

Fixes: quarkusio#15555
  • Loading branch information
geoand committed Mar 9, 2021
1 parent ee25c48 commit ea310e5
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import java.util.Set;
import java.util.stream.Collectors;

import io.quarkus.deployment.IsTest;
import org.jboss.logging.Logger;

import io.dekorate.Session;
Expand Down Expand Up @@ -75,7 +76,7 @@ public EnabledKubernetesDeploymentTargetsBuildItem enabledKubernetesDeploymentTa
return new EnabledKubernetesDeploymentTargetsBuildItem(entries);
}

@BuildStep
@BuildStep(onlyIfNot = IsTest.class)
public void build(ApplicationInfoBuildItem applicationInfo,
OutputTargetBuildItem outputTarget,
PackageConfig packageConfig,
Expand Down

0 comments on commit ea310e5

Please sign in to comment.