-
Notifications
You must be signed in to change notification settings - Fork 519
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
VolumePermissionEnricherTest : Replace AssertJ's deprecated asList()
DSL method with asInstanceOf(InstanceOfAssertFactories.list(type.class))
#3361
Comments
hey @rohanKanojia can i do it |
kindly assign this to me. |
Hey @vijaybhagwat24 I was away for 4 days because of some interview I'm working on it rn. I'll finish it tomorrow sorry for not updating |
hope you completed this. |
Hi @vijaybhagwat24 |
I've been working on the issue #3361, specifically updating the VolumePermissionEnricherTest by replacing the deprecated asList() DSL method with asInstanceOf(InstanceOfAssertFactories.list(type.class)). During the process, I encountered a build failure due to missing Kubernetes dependencies, including io.fabric8.kubernetes.api.model and io.fabric8.kubernetes.client. Could you please clarify whether I need to explicitly add these dependencies to the project, or if there’s a different setup for the build environment that I might be missing? Also, I wanted to confirm if omitting the asInstanceOf() method within the singleElement() assertion is valid, or if it must be retained to ensure type safety. My understanding is that the asInstanceOf() method is essential for handling type inference, and removing it might cause issues in assertions on lists like VolumeMount. |
You likely have some issue in your IDE setup.
You need to do the replacements whenever the AssertJ Some tips for IntelliJ in case things are not working for you: Checking the |
Component
JKube Kit
Task description
In the latest versions of Assertj
asList()
DSL method has been marked as deprecated:jkube/jkube-kit/enricher/generic/src/test/java/org/eclipse/jkube/enricher/generic/VolumePermissionEnricherTest.java
Line 98 in c2c9a0c
users are advised to use
asInstanceOf(InstanceOfAssertFactories.list(type.class))
instead, we need to updateasList()
calls with this.Expected Behavior
AssertJ's
asList()
is replaced withasInstanceOf(InstanceOfAssertFactories.list(type.class))
Acceptance Criteria
asList()
DSL method call is replaced withasInstanceOf(InstanceOfAssertFactories.list(type.class))
in all placesThe text was updated successfully, but these errors were encountered: