Skip to content

Commit a68aee3

Browse files
committed
Export envtest.ReadCRDFiles
Signed-off-by: Stefan Büringer buringerst@vmware.com
1 parent 9024933 commit a68aee3

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

pkg/envtest/crd.go

+4-4
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensio
9494
defaultCRDOptions(&options)
9595

9696
// Read the CRD yamls into options.CRDs
97-
if err := readCRDFiles(&options); err != nil {
97+
if err := ReadCRDFiles(&options); err != nil {
9898
return nil, fmt.Errorf("unable to read CRD files: %w", err)
9999
}
100100

@@ -115,8 +115,8 @@ func InstallCRDs(config *rest.Config, options CRDInstallOptions) ([]*apiextensio
115115
return options.CRDs, nil
116116
}
117117

118-
// readCRDFiles reads the directories of CRDs in options.Paths and adds the CRD structs to options.CRDs.
119-
func readCRDFiles(options *CRDInstallOptions) error {
118+
// ReadCRDFiles reads the directories of CRDs in options.Paths and adds the CRD structs to options.CRDs.
119+
func ReadCRDFiles(options *CRDInstallOptions) error {
120120
if len(options.Paths) > 0 {
121121
crdList, err := renderCRDs(options)
122122
if err != nil {
@@ -217,7 +217,7 @@ func (p *poller) poll(ctx context.Context) (done bool, err error) {
217217
// UninstallCRDs uninstalls a collection of CRDs by reading the crd yaml files from a directory.
218218
func UninstallCRDs(config *rest.Config, options CRDInstallOptions) error {
219219
// Read the CRD yamls into options.CRDs
220-
if err := readCRDFiles(&options); err != nil {
220+
if err := ReadCRDFiles(&options); err != nil {
221221
return err
222222
}
223223

pkg/envtest/crd_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ var _ = Describe("Test", func() {
3131
"testdata/crdv1_original",
3232
},
3333
}
34-
err := readCRDFiles(&opt)
34+
err := ReadCRDFiles(&opt)
3535
Expect(err).NotTo(HaveOccurred())
3636

3737
expectedCRDs := sets.NewString(

0 commit comments

Comments
 (0)