Skip to content

Commit

Permalink
Remove 2.12 configurations from main
Browse files Browse the repository at this point in the history
Signed-off-by: Dale Haiducek <[email protected]>
  • Loading branch information
dhaiducek committed Nov 11, 2024
1 parent 9fca0b1 commit 52ef352
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 9 deletions.
18 changes: 18 additions & 0 deletions pkg/crd/gen_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,24 @@ var _ = Describe("CRD Generation proper defaulting", func() {
By("searching preserveUnknownFields")
Expect(out.buf.String()).NotTo(ContainSubstring("preserveUnknownFields"))
})

It("should truncate CRD descriptions", func() {
By("calling Generate")
var fifty int = 50
gen := &crd.Generator{
CRDVersions: []string{"v1"},
MaxDescLen: &fifty,
}
Expect(gen.Generate(ctx)).NotTo(HaveOccurred())

By("loading the desired YAML")
expectedFile, err := os.ReadFile(filepath.Join(genDir, "bar.example.com_foos.yaml"))
Expect(err).NotTo(HaveOccurred())
expectedFile = fixAnnotations(expectedFile)

By("comparing the two")
Expect(out.buf.String()).To(Equal(string(expectedFile)), cmp.Diff(out.buf.String(), string(expectedFile)))
})
})

// fixAnnotations fixes the attribution annotation for tests.
Expand Down
10 changes: 5 additions & 5 deletions pkg/crd/markers/zz_generated.markerhelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions pkg/crd/zz_generated.markerhelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/genall/zz_generated.markerhelp.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 52ef352

Please sign in to comment.