eclipse-jkube / jkube

Build and Deploy java applications on Kubernetes
https://www.eclipse.dev/jkube/
Eclipse Public License 2.0
775 stars 522 forks source link

Replaced AsList() with InstanceOfAssertFactories.type(Type.class) in `ImagePullPolicyEnricherTest` #3445

Closed ShivamChavan01 closed 1 month ago

ShivamChavan01 commented 1 month ago

Description

Replaced asList() with InstanceOfAssertFactories.type(Container.class) Fixes #3435

Type of change

Checklist

manusa commented 1 month ago

Eclipse JKube CI Report

Started new GH workflow run for https://github.com/eclipse-jkube/jkube/pull/3445 (2024-10-09T19:23:27Z)

:gear: JKube E2E Tests (11261463173)

Test results

:heavy_check_mark: Test reports (Windows) ``` [✓] WindowsITCase - k8sBuild - k8s:build, should create image [✓] WindowsITCase - k8sPush - k8s:push, should push image to remote registry [✓] WindowsITCase - k8sResource - k8s:resource, should create manifests [✓] WindowsITCase - ocResource - oc:resource, should create manifests [✓] WindowsITCase - k8sHelm - k8s:helm, should create Helm charts [✓] WindowsITCase - ocHelm - oc:helm, should create Helm charts [✓] All tests (6) passed successfully!!! ```
:x: Test reports (OpenShift v3.10.0-quarkus) ``` [✓] QuarkusOcITCase - ocBuild - oc:build, should create image [✓] QuarkusOcITCase - ocResource - oc:resource, should create manifests [✓] QuarkusOcITCase - ocHelm - oc:helm, should create Helm charts [✓] QuarkusOcTraceEnabledITCase - ocBuild - oc:build, with org.slf4j.simpleLogger.defaultLogLevel=trace, should create image and print trace logs [✓] QuarkusOcTraceEnabledITCase - ocResource - oc:resource, should create manifests [✓] QuarkusOcITCase - ocApply - oc:apply, should deploy pod and service [✓] QuarkusOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [X] QuarkusOcTraceEnabledITCase - ocApply - oc:apply, with org.slf4j.simpleLogger.defaultLogLevel=trace, should deploy pod and service and print trace logs [✓] QuarkusOcTraceEnabledITCase - ocLog - oc:log, with org.slf4j.simpleLogger.defaultLogLevel=trace, should retrieve log and print trace logs [✓] QuarkusOcTraceEnabledITCase - ocUndeploy - oc:undeploy, with org.slf4j.simpleLogger.defaultLogLevel=trace, should delete all applied resources and print trace logs [X] Some tests did not pass (Failed tests 1/5) ```
:heavy_check_mark: Test reports (OpenShift v3.10.0-webapp) ``` [✓] ZeroConfigOcITCase - ocBuild - oc:build, should create image [✓] ZeroConfigOcITCase - ocResource - oc:resource, should create manifests [✓] JettyOcITCase - ocBuild - oc:build, should create image [✓] JettyOcITCase - ocResource - oc:resource, should create manifests [✓] WildFlyOcDockerModeITCase - ocBuild - oc:build, should create image using docker [✓] WildFlyOcDockerModeITCase - ocResource - k8s:resource, should create manifests [✓] WildFlyOcITCase - ocBuild - oc:build, should create image [✓] WildFlyOcITCase - ocResource - oc:resource, should create manifests [✓] ZeroConfigOcITCase - ocApply - oc:apply, should deploy pod and service [✓] ZeroConfigOcITCase - testNodePortResponse - Service as NodePort response should return String [✓] ZeroConfigOcITCase - ocLog - oc:log, should retrieve log [✓] JettyOcITCase - ocApply - oc:apply, should deploy pod and service [✓] ZeroConfigOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] JettyOcITCase - ocLog - oc:log, should retrieve log [✓] JettyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] WildFlyOcDockerModeITCase - ocApply - oc:apply, should deploy pod and service [✓] WildFlyOcDockerModeITCase - ocLog - oc:log, should retrieve logs [✓] WildFlyOcDockerModeITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] WildFlyOcITCase - ocApply - oc:apply, should deploy pod and service [✓] WildFlyOcITCase - ocLog - oc:log, should retrieve logs [✓] WildFlyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] All tests (5) passed successfully!!! ```
:heavy_check_mark: Test reports (OpenShift v3.10.0-springboot) ``` [✓] HelmConfigOcITCase - ocResource - oc:resource, no specified profile, should create default resource manifests [✓] HelmConfigOcITCase - ocHelm - oc:helm, should create Helm charts [✓] HelmConfigOcITCase - ocHelmPush - oc:helm-push, should push the charts [✓] HelmConfigOcITCase - ocHelmInstall - oc:helm-install, should install the charts [✓] HelmConfigOcITCase - ocHelmUninstall - oc:helm-uninstall, should uninstall the charts [✓] HelmConfigOcITCase - ocHelmUninstall_whenNoReleasePresent_thenErrorMessageDisplayed - oc:helm-uninstall, no release present, display error message [✓] CompleteOcDockerITCase - ocBuild - oc:build, with jkube.build.strategy=docker, should create image [✓] CompleteOcDockerITCase - ocResource - oc:resource, should create manifests [✓] ZeroConfigOcITCase - ocBuild - oc:build, should create image [✓] ZeroConfigOcITCase - ocResource - oc:resource, should create manifests [✓] ZeroConfigOcGradleITCase - ocBuild - ocBuild, should create image [✓] ZeroConfigOcGradleITCase - ocResource - ocResource, should create manifests [✓] WatchOcITCase - watch_whenSourceModified_shouldLiveReloadChanges - watch, SHOULD hot reload application on changes [✓] LayeredJarDisabledOcDockerITCase - ocBuild - oc:build, with jkube.build.strategy=docker, should create image [✓] LayeredJarDisabledOcDockerITCase - ocResource - oc:resource, should create manifests [✓] CompleteOcDockerITCase - ocApply - oc:apply, should deploy pod and service [✓] CompleteOcDockerITCase - ocLog - oc:log, should retrieve log [✓] ZeroConfigOcITCase - ocApply - oc:apply, should deploy pod and service [✓] CompleteOcDockerITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] ZeroConfigOcITCase - ocHelm - oc:helm, should create Helm charts [✓] ZeroConfigOcGradleITCase - ocApply - ocApply, should deploy pod and service [✓] ZeroConfigOcGradleITCase - ocHelm - ocHelm, should create Helm charts [✓] ZeroConfigOcITCase - ocLog - oc:log, should retrieve log [✓] ZeroConfigOcGradleITCase - ocLog - ocLog, should retrieve log [✓] ZeroConfigOcGradleITCase - ocUndeploy - ocUndeploy, should delete all applied resources [✓] ZeroConfigOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] LayeredJarDisabledOcDockerITCase - ocApply - oc:apply, should deploy pod and service [✓] LayeredJarDisabledOcDockerITCase - ocLog - oc:log, should retrieve log [✓] LayeredJarDisabledOcDockerITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] All tests (5) passed successfully!!! ```
:heavy_check_mark: Test reports (OpenShift v3.10.0-other) ``` [✓] ThorntailOcITCase - ocBuild - oc:build, should create image [✓] ThorntailOcITCase - ocResource - oc:resource, should create manifests [✓] DslOcGradleITCase - ocBuild - ocBuild, should create image [✓] DslOcGradleITCase - ocResource - ocResource, should create manifests [✓] WildflyJarOcITCase - ocBuild - oc:build, should create image [✓] WildflyJarOcITCase - ocResource - oc:resource, should create manifests [✓] OpenLibertyOcITCase - ocBuild - oc:build, should create image [✓] OpenLibertyOcITCase - ocResource - oc:resource, should create manifests [✓] KarafOcITCase - ocBuild - oc:build, should create image [✓] KarafOcITCase - ocResource - oc:resource, should create resource manifests [✓] VertxOcITCase - ocBuild - oc:build, should create image [✓] VertxOcITCase - ocResource - oc:resource, should create manifests [✓] ThorntailOcITCase - ocApply - oc:apply, should deploy pod and service [✓] ThorntailOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] DslOcGradleITCase - ocApply - ocApply, should deploy pod and service [✓] DslOcGradleITCase - ocHelm - ocHelm, should create Helm charts [✓] DslOcGradleITCase - ocLog - ocLog, should retrieve log [✓] DslOcGradleITCase - ocUndeploy - ocUndeploy, should delete all applied resources [✓] WildflyJarOcITCase - ocApply - oc:apply, should deploy pod and service [✓] WildflyJarOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] OpenLibertyOcITCase - ocApply - oc:apply, should deploy pod and service [✓] OpenLibertyOcITCase - ocLog - oc:log, should retrieve log [✓] OpenLibertyOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] KarafOcITCase - ocApply - oc:apply, should create pod, service and route [✓] KarafOcITCase - ocLog - oc:log, should retrieve log [✓] VertxOcITCase - ocApply - oc:apply, should deploy pod and service [✓] KarafOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] VertxOcITCase - k8sLog - oc:log, should retrieve log [✓] VertxOcITCase - ocUndeploy - oc:undeploy, should delete all applied resources [✓] All tests (5) passed successfully!!! ```
ShivamChavan01 commented 1 month ago

https://github.com/eclipse-jkube/jkube/blob/dad4cc61149c435dbf91a5700a2c7f7cfe7d9a99/jkube-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic/ImagePullPolicyEnricherTest.java#L250-L254

while Replacing asList() method in this line im getting an error Could you provide some guidance or let me know if there’s a better approach I should consider for this refactor?

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud