Skip to content

Commit

Permalink
test: fix Sonar smells in CRD generator tests
Browse files Browse the repository at this point in the history
Signed-off-by: David Sondermann <[email protected]>
  • Loading branch information
Donnerbart committed Nov 25, 2024
1 parent 2c13e8d commit 95ddc58
Show file tree
Hide file tree
Showing 2 changed files with 191 additions and 222 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,10 @@ void testCalicoIPPoolCRDDoesNotCompileWhenDuplicatesAreNotDeprecated() throws Ex
.build();

// Assert
assertThatThrownBy(() -> {
// Act
new FileJavaGenerator(config, crd).run(tempDir);
javac().compile(getSources(tempDir));
}).as("The current CRD should not compile since it contains duplicate fields which are not marked as deprecated")
assertThatThrownBy(
// Act
() -> new FileJavaGenerator(config, crd).run(tempDir))
.as("The current CRD should not compile since it contains duplicate fields which are not marked as deprecated")
.isInstanceOf(JavaGeneratorException.class);
}

Expand Down
Loading

0 comments on commit 95ddc58

Please sign in to comment.