1- package crd_constraints_test
1+ package crdconstraints_test
22
33import (
44 "context"
@@ -12,10 +12,10 @@ import (
1212 "github.com/operator-framework/deppy/pkg/deppy/input"
1313 "github.com/operator-framework/operator-registry/alpha/property"
1414
15- "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/bundles_and_dependencies "
16- "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/crd_constraints "
15+ "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/bundlesanddependencies "
16+ "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/crdconstraints "
1717 olmentity "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/entity"
18- "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/required_package "
18+ "github.com/operator-framework/operator-controller/internal/resolution/variable_sources/requiredpackage "
1919)
2020
2121func TestGlobalConstraints (t * testing.T ) {
@@ -27,7 +27,7 @@ var _ = Describe("BundleUniquenessVariable", func() {
2727 var (
2828 id deppy.Identifier
2929 atMostIDs []deppy.Identifier
30- globalConstraintVariable * crd_constraints .BundleUniquenessVariable
30+ globalConstraintVariable * crdconstraints .BundleUniquenessVariable
3131 )
3232
3333 BeforeEach (func () {
@@ -36,7 +36,7 @@ var _ = Describe("BundleUniquenessVariable", func() {
3636 deppy .IdentifierFromString ("test-at-most-id-1" ),
3737 deppy .IdentifierFromString ("test-at-most-id-2" ),
3838 }
39- globalConstraintVariable = crd_constraints .NewBundleUniquenessVariable (id , atMostIDs ... )
39+ globalConstraintVariable = crdconstraints .NewBundleUniquenessVariable (id , atMostIDs ... )
4040 })
4141
4242 It ("should initialize a new global constraint variable" , func () {
@@ -145,14 +145,14 @@ var bundleSet = map[deppy.Identifier]*input.Entity{
145145var _ = Describe ("CRDUniquenessConstraintsVariableSource" , func () {
146146 var (
147147 inputVariableSource * MockInputVariableSource
148- crdConstraintVariableSource * crd_constraints .CRDUniquenessConstraintsVariableSource
148+ crdConstraintVariableSource * crdconstraints .CRDUniquenessConstraintsVariableSource
149149 ctx context.Context
150150 entitySource input.EntitySource
151151 )
152152
153153 BeforeEach (func () {
154154 inputVariableSource = & MockInputVariableSource {}
155- crdConstraintVariableSource = crd_constraints .NewCRDUniquenessConstraintsVariableSource (inputVariableSource )
155+ crdConstraintVariableSource = crdconstraints .NewCRDUniquenessConstraintsVariableSource (inputVariableSource )
156156 ctx = context .Background ()
157157
158158 // the entity is not used in this variable source
@@ -161,16 +161,16 @@ var _ = Describe("CRDUniquenessConstraintsVariableSource", func() {
161161
162162 It ("should get variables from the input variable source and create global constraint variables" , func () {
163163 inputVariableSource .ResultSet = []deppy.Variable {
164- required_package .NewRequiredPackageVariable ("test-package" , []* olmentity.BundleEntity {
164+ requiredpackage .NewRequiredPackageVariable ("test-package" , []* olmentity.BundleEntity {
165165 olmentity .NewBundleEntity (bundleSet ["bundle-2" ]),
166166 olmentity .NewBundleEntity (bundleSet ["bundle-1" ]),
167167 }),
168- required_package .NewRequiredPackageVariable ("test-package-2" , []* olmentity.BundleEntity {
168+ requiredpackage .NewRequiredPackageVariable ("test-package-2" , []* olmentity.BundleEntity {
169169 olmentity .NewBundleEntity (bundleSet ["bundle-14" ]),
170170 olmentity .NewBundleEntity (bundleSet ["bundle-15" ]),
171171 olmentity .NewBundleEntity (bundleSet ["bundle-16" ]),
172172 }),
173- bundles_and_dependencies .NewBundleVariable (
173+ bundlesanddependencies .NewBundleVariable (
174174 olmentity .NewBundleEntity (bundleSet ["bundle-2" ]),
175175 []* olmentity.BundleEntity {
176176 olmentity .NewBundleEntity (bundleSet ["bundle-3" ]),
@@ -180,70 +180,70 @@ var _ = Describe("CRDUniquenessConstraintsVariableSource", func() {
180180 olmentity .NewBundleEntity (bundleSet ["bundle-7" ]),
181181 },
182182 ),
183- bundles_and_dependencies .NewBundleVariable (
183+ bundlesanddependencies .NewBundleVariable (
184184 olmentity .NewBundleEntity (bundleSet ["bundle-1" ]),
185185 []* olmentity.BundleEntity {
186186 olmentity .NewBundleEntity (bundleSet ["bundle-6" ]),
187187 olmentity .NewBundleEntity (bundleSet ["bundle-7" ]),
188188 olmentity .NewBundleEntity (bundleSet ["bundle-8" ]),
189189 },
190190 ),
191- bundles_and_dependencies .NewBundleVariable (
191+ bundlesanddependencies .NewBundleVariable (
192192 olmentity .NewBundleEntity (bundleSet ["bundle-3" ]),
193193 []* olmentity.BundleEntity {},
194194 ),
195- bundles_and_dependencies .NewBundleVariable (
195+ bundlesanddependencies .NewBundleVariable (
196196 olmentity .NewBundleEntity (bundleSet ["bundle-4" ]),
197197 []* olmentity.BundleEntity {},
198198 ),
199- bundles_and_dependencies .NewBundleVariable (
199+ bundlesanddependencies .NewBundleVariable (
200200 olmentity .NewBundleEntity (bundleSet ["bundle-5" ]),
201201 []* olmentity.BundleEntity {},
202202 ),
203- bundles_and_dependencies .NewBundleVariable (
203+ bundlesanddependencies .NewBundleVariable (
204204 olmentity .NewBundleEntity (bundleSet ["bundle-6" ]),
205205 []* olmentity.BundleEntity {},
206206 ),
207- bundles_and_dependencies .NewBundleVariable (
207+ bundlesanddependencies .NewBundleVariable (
208208 olmentity .NewBundleEntity (bundleSet ["bundle-7" ]),
209209 []* olmentity.BundleEntity {
210210 olmentity .NewBundleEntity (bundleSet ["bundle-8" ]),
211211 olmentity .NewBundleEntity (bundleSet ["bundle-9" ]),
212212 olmentity .NewBundleEntity (bundleSet ["bundle-10" ]),
213213 },
214214 ),
215- bundles_and_dependencies .NewBundleVariable (
215+ bundlesanddependencies .NewBundleVariable (
216216 olmentity .NewBundleEntity (bundleSet ["bundle-8" ]),
217217 []* olmentity.BundleEntity {},
218218 ),
219- bundles_and_dependencies .NewBundleVariable (
219+ bundlesanddependencies .NewBundleVariable (
220220 olmentity .NewBundleEntity (bundleSet ["bundle-9" ]),
221221 []* olmentity.BundleEntity {},
222222 ),
223- bundles_and_dependencies .NewBundleVariable (
223+ bundlesanddependencies .NewBundleVariable (
224224 olmentity .NewBundleEntity (bundleSet ["bundle-10" ]),
225225 []* olmentity.BundleEntity {},
226226 ),
227- bundles_and_dependencies .NewBundleVariable (
227+ bundlesanddependencies .NewBundleVariable (
228228 olmentity .NewBundleEntity (bundleSet ["bundle-14" ]),
229229 []* olmentity.BundleEntity {},
230230 ),
231- bundles_and_dependencies .NewBundleVariable (
231+ bundlesanddependencies .NewBundleVariable (
232232 olmentity .NewBundleEntity (bundleSet ["bundle-15" ]),
233233 []* olmentity.BundleEntity {},
234234 ),
235- bundles_and_dependencies .NewBundleVariable (
235+ bundlesanddependencies .NewBundleVariable (
236236 olmentity .NewBundleEntity (bundleSet ["bundle-16" ]),
237237 []* olmentity.BundleEntity {},
238238 ),
239239 }
240240 variables , err := crdConstraintVariableSource .GetVariables (ctx , entitySource )
241241 Expect (err ).ToNot (HaveOccurred ())
242242 Expect (variables ).To (HaveLen (26 ))
243- var crdConstraintVariables []* crd_constraints .BundleUniquenessVariable
243+ var crdConstraintVariables []* crdconstraints .BundleUniquenessVariable
244244 for _ , variable := range variables {
245245 switch v := variable .(type ) {
246- case * crd_constraints .BundleUniquenessVariable :
246+ case * crdconstraints .BundleUniquenessVariable :
247247 crdConstraintVariables = append (crdConstraintVariables , v )
248248 }
249249 }
@@ -265,7 +265,7 @@ var _ = Describe("CRDUniquenessConstraintsVariableSource", func() {
265265
266266 It ("should return an error if input variable source returns an error" , func () {
267267 inputVariableSource = & MockInputVariableSource {Err : fmt .Errorf ("error getting variables" )}
268- crdConstraintVariableSource = crd_constraints .NewCRDUniquenessConstraintsVariableSource (inputVariableSource )
268+ crdConstraintVariableSource = crdconstraints .NewCRDUniquenessConstraintsVariableSource (inputVariableSource )
269269 _ , err := crdConstraintVariableSource .GetVariables (ctx , entitySource )
270270 Expect (err ).To (HaveOccurred ())
271271 Expect (err .Error ()).To (ContainSubstring ("error getting variables" ))
@@ -304,7 +304,7 @@ func (m *MockInputVariableSource) GetVariables(_ context.Context, _ input.Entity
304304 return m .ResultSet , nil
305305}
306306
307- func CollectGlobalConstraintVariableIDs (vars []* crd_constraints .BundleUniquenessVariable ) []string {
307+ func CollectGlobalConstraintVariableIDs (vars []* crdconstraints .BundleUniquenessVariable ) []string {
308308 ids := make ([]string , 0 , len (vars ))
309309 for _ , v := range vars {
310310 ids = append (ids , v .Identifier ().String ())
0 commit comments