Skip to content

Commit

Permalink
Fix bundle-generator/deployment manifest generation in integration te…
Browse files Browse the repository at this point in the history
…sts (#730)

* fix: set tmpdir under project build dir

* chore: re-activate disabled tests

Signed-off-by: Chris Laprun <claprun@redhat.com>

---------

Signed-off-by: Chris Laprun <claprun@redhat.com>
Co-authored-by: Chris Laprun <claprun@redhat.com>
  • Loading branch information
iocanel and metacosm authored Sep 25, 2023
1 parent 788e345 commit 53b8fad
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
10 changes: 9 additions & 1 deletion bundle-generator/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@
</annotationProcessorPaths>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!-- set tmpdir as early as possible because surefire sets it too late for JDK16 -->
<argLine>-Djava.io.tmpdir="${project.build.directory}"</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import static io.quarkiverse.operatorsdk.bundle.Utils.*;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

import java.io.IOException;

Expand All @@ -11,6 +12,7 @@
import io.fabric8.kubernetes.api.model.HasMetadata;
import io.fabric8.kubernetes.api.model.Pod;
import io.quarkiverse.operatorsdk.bundle.sources.*;
import io.quarkiverse.operatorsdk.common.ConfigurationUtils;
import io.quarkus.test.ProdBuildResults;
import io.quarkus.test.ProdModeTestResults;
import io.quarkus.test.QuarkusProdModeTest;
Expand Down Expand Up @@ -81,14 +83,13 @@ public void shouldWriteBundleForTheOperators() throws IOException {
assertEquals(VERSION, spec.getVersion());

// check that the env variable to set the reconciler namespaces is properly set
/*
* disabled because of https://github.com/quarkusio/quarkus/issues/36041
* final var firstContainer = spec.getInstall().getSpec().getDeployments().get(0).getSpec().getTemplate().getSpec()
* .getContainers().get(0);
* assertTrue(firstContainer.getEnv().stream()
* .anyMatch(envVar -> envVar.getName()
* .equals(ConfigurationUtils.getNamespacesPropertyName(ThirdReconciler.NAME, true))));
*
*/

//disabled because of https://github.com/quarkusio/quarkus/issues/36041
final var firstContainer = spec.getInstall().getSpec().getDeployments().get(0).getSpec().getTemplate().getSpec()
.getContainers().get(0);
assertTrue(firstContainer.getEnv().stream()
.anyMatch(envVar -> envVar.getName()
.equals(ConfigurationUtils.getNamespacesPropertyName(ThirdReconciler.NAME, true))));

}
}

0 comments on commit 53b8fad

Please sign in to comment.