Skip to content

Commit

Permalink
fix: replace AssertJ's deprecated asList() DSL method in ControllerRe…
Browse files Browse the repository at this point in the history
…sourceConfigTest (3254)

issue-3240:-Replace assertJ Depricate method
---
issue-3240:-Replace assertJ Depricate method
---
issue-3240:-Replace singleElement()
  • Loading branch information
vijaybhagwat24 authored Jul 24, 2024
1 parent 0585869 commit 9a934ce
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ private void assertControllerResourceConfig(ControllerResourceConfig controllerR
.hasFieldOrPropertyWithValue("imagePullPolicy", "IfNotPresent")
.hasFieldOrPropertyWithValue("cmd", Arguments.builder().exec(Arrays.asList("sleep", "10")).build())
.extracting(InitContainerConfig::getVolumes)
.asList()
.singleElement(InstanceOfAssertFactories.type(VolumeConfig.class))
.asInstanceOf(InstanceOfAssertFactories.list(VolumeConfig.class))
.singleElement()
.hasFieldOrPropertyWithValue("name", "workdir")
.hasFieldOrPropertyWithValue("path", "/work-dir"))
.satisfies(c -> assertThat(c.getVolumes())
Expand Down

0 comments on commit 9a934ce

Please sign in to comment.