-
Notifications
You must be signed in to change notification settings - Fork 521
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix failing unit tests in gradle-plugin/it
module
#3406
Comments
Hi, I want to contribute to this issue. |
Hello I am stuck with `Execution failed for task ':dependency:clean'.
|
@rexrk : Sorry, I missed this notification. I'll try to check this on my personal windows machine this weekend. Is it possible for you to create pull request for integration tests that you managed to fix? |
@rohanKanojia I am unsure about other ones as well, is this correct fix as the error is showing
|
DependencyResourceIT seems to be failing due to a race condition between the two tests, TriggersAnnotationIT is failing due to windows line breaks added to annotation in TriggersAnnotationEnricher. Modifying below line to this makes it pass Line 156 in 82d13bc
ConfigMapIT and FileSecretIT are failing due to a similar reason. I suggest breaking this issue down into smaller issues per test failures. |
Rather than make the tests follow a strict order, we should decouple them |
@rohanKanojia @manusa yes as i already tried ordering with @order() annotation but it still was failing. |
@rexrk : I also had to remove I found a better way to fix this issue without splitting the test. We can avoid conflict by instructing jkube to generate resources in a different directory: diff --git a/gradle-plugin/it/src/test/java/org/eclipse/jkube/gradle/plugin/tests/DependencyResourcesIT.java b/gradle-plugin/it/src/test/java/org/eclipse/jkube/gradle/plugin/tests/DependencyResourcesIT.java
index 0792d7d0e..8d1012149 100644
--- a/gradle-plugin/it/src/test/java/org/eclipse/jkube/gradle/plugin/tests/DependencyResourcesIT.java
+++ b/gradle-plugin/it/src/test/java/org/eclipse/jkube/gradle/plugin/tests/DependencyResourcesIT.java
@@ -32,7 +32,7 @@ class DependencyResourcesIT {
void k8sResource_whenRun_generatesK8sManifestsIncludingDependencies() throws IOException, ParseException {
// When
final BuildResult result = gradleRunner.withITProject("dependency-resources")
- .withArguments("clean", "jar", "k8sResource", "--stacktrace")
+ .withArguments("jar", "k8sResource", "--stacktrace")
.build();
// Then
ResourceVerify.verifyResourceDescriptors(
@@ -49,12 +49,12 @@ class DependencyResourcesIT {
void k8sResource_whenRunWithReplicas_generatesK8sManifestsIncludingDependencies() throws IOException, ParseException {
// When
final BuildResult result = gradleRunner.withITProject("dependency-resources")
- .withArguments("-Pjkube.replicas=1337", "clean", "jar", "k8sResource", "--stacktrace")
+ .withArguments("-Pjkube.targetDir=build/classes/java/main/META-INF/jkube-replicas-override", "-Pjkube.replicas=1337", "jar", "k8sResource", "--stacktrace")
.build();
// Then
ResourceVerify.verifyResourceDescriptors(
gradleRunner.resolveFile("dependent", "build", "classes", "java", "main",
- "META-INF", "jkube", "kubernetes.yml"),
+ "META-INF", "jkube-replicas-override", "kubernetes.yml"),
gradleRunner.resolveFile("expected", "kubernetes-with-replica-override.yml"));
assertThat(result).extracting(BuildResult::getOutput).asString()
.contains("Using resource templates from") |
I've created these issues to break down this task: |
@rohanKanojia this DependencyResource fix seems more straight forward approach ! Kudos and thanks 🙌 |
Component
None
Task description
Component
Gradle Plugin Integration Tests
Task description
Description
Related to #1338
When executing
mvn clean install
on Windows, the following unit tests are failing ingradle-plugin/it
module:I think we need to adapt these tests in order to make them work on windows:
Expected Behavior
All unit tests in
gradle-plugin/it
module should pass on windowsAcceptance Criteria
gradle-plugin/it
moduleThe text was updated successfully, but these errors were encountered: