From 70b2128f20144d07a56b253948060936033c9f56 Mon Sep 17 00:00:00 2001 From: Marc Nuri Date: Thu, 28 Nov 2024 10:41:48 +0100 Subject: [PATCH] test(crd-generator): approval test for default double Signed-off-by: Marc Nuri --- .../crd/generator/approvaltests/annotated/AnnotatedSpec.java | 3 +++ ....approvalTest.annotateds.samples.fabric8.io.v1.approved.yml | 3 +++ ...ovalTest.annotateds.samples.fabric8.io.v1beta1.approved.yml | 3 +++ 3 files changed, 9 insertions(+) diff --git a/crd-generator/test/src/test/java/io/fabric8/crd/generator/approvaltests/annotated/AnnotatedSpec.java b/crd-generator/test/src/test/java/io/fabric8/crd/generator/approvaltests/annotated/AnnotatedSpec.java index 47de1085b7..af63a01abc 100644 --- a/crd-generator/test/src/test/java/io/fabric8/crd/generator/approvaltests/annotated/AnnotatedSpec.java +++ b/crd-generator/test/src/test/java/io/fabric8/crd/generator/approvaltests/annotated/AnnotatedSpec.java @@ -51,6 +51,9 @@ public class AnnotatedSpec { @JsonProperty(defaultValue = "1337") @Default("1337") // compatibility with CRDGenerator-v1 private int defaultInt; + @JsonProperty(defaultValue = "13.37") + @Default("13.37") // compatibility with CRDGenerator-v1 + private double defaultDouble; @Required private boolean emptySetter; @Required diff --git a/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1.approved.yml b/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1.approved.yml index e4376dc820..f6fa392f34 100644 --- a/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1.approved.yml +++ b/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1.approved.yml @@ -25,6 +25,9 @@ spec: defaultBoolean: default: true type: "boolean" + defaultDouble: + default: 13.37 + type: "number" defaultInt: default: 1337 type: "integer" diff --git a/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1beta1.approved.yml b/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1beta1.approved.yml index d505300d99..fd516ad6ce 100644 --- a/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1beta1.approved.yml +++ b/crd-generator/test/src/test/resources/io/fabric8/crd/generator/approvaltests/CRDGeneratorApprovalTest.approvalTest.annotateds.samples.fabric8.io.v1beta1.approved.yml @@ -23,6 +23,9 @@ spec: defaultBoolean: default: true type: "boolean" + defaultDouble: + default: 13.37 + type: "number" defaultInt: default: 1337 type: "integer"