Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
Signed-off-by: Attila Mészáros <a_meszaros@apple.com>
  • Loading branch information
csviri committed Nov 14, 2024
1 parent 72309ce commit 208d1d2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,8 @@ private static void applyCrd(InputStream is, String path, KubernetesClient clien

public static CustomResourceDefinition parseCrd(String path, KubernetesClient client) {
try (InputStream is = new FileInputStream(path)) {
return (CustomResourceDefinition) client.load(new ByteArrayInputStream(is.readAllBytes()));
return (CustomResourceDefinition) client.load(new ByteArrayInputStream(is.readAllBytes()))
.items().get(0);
} catch (FileNotFoundException e) {
throw new RuntimeException(e);
} catch (IOException e) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class CRDMappingInTestExtensionIT {
LocallyRunOperatorExtension operator =
LocallyRunOperatorExtension.builder()
.withReconciler(new TestReconciler())
.withAdditionalCRD("src/test/resource/crd/test.crd")
.withAdditionalCRD("src/test/resources/crd/test.crd")
.build();

@Test
Expand Down

0 comments on commit 208d1d2

Please sign in to comment.