Skip to content

Commit 42cc0f0

Browse files
perdasilvaanik120joelanford
authored
Apply suggestions from code review
Co-authored-by: Anik <anikbhattacharya93@gmail.com> Co-authored-by: Joe Lanford <joe.lanford@gmail.com>
1 parent 14e1789 commit 42cc0f0

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

internal/operator-controller/rukpak/render/render.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func defaultTargetNamespacesForBundle(rv1 *bundle.RegistryV1, installNamespace s
184184
return nil
185185
}
186186

187-
func getSupportedInstallModesSet(rv1 *bundle.RegistryV1) sets.Set[v1alpha1.InstallModeType] {
187+
func supportedInstallModes(rv1 *bundle.RegistryV1) sets.Set[v1alpha1.InstallModeType] {
188188
supportedInstallModes := sets.New[v1alpha1.InstallModeType]()
189189
for _, im := range rv1.CSV.Spec.InstallModes {
190190
if im.Supported {

internal/operator-controller/rukpak/render/render_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,14 +140,14 @@ func Test_BundleRenderer_CreatesCorrectRenderOptions_WithDefaults(t *testing.T)
140140
}, {
141141
name: "returns error if target namespaces is not set bundle supports install modes [SingleNamespace]",
142142
csv: MakeCSV(WithInstallModeSupportFor(v1alpha1.InstallModeTypeSingleNamespace)),
143-
expectedErrMsgFragment: "at least one target namespace must be specified",
143+
expectedErrMsgFragment: "exactly one target namespace must be specified",
144144
}, {
145145
name: "returns error if target namespaces is not set bundle supports install modes [MultiNamespace]",
146-
csv: MakeCSV(WithInstallModeSupportFor(v1alpha1.InstallModeTypeSingleNamespace)),
146+
csv: MakeCSV(WithInstallModeSupportFor(v1alpha1.InstallModeTypeMultiNamespace)),
147147
expectedErrMsgFragment: "at least one target namespace must be specified",
148148
}, {
149149
name: "returns error if target namespaces is not set bundle supports install modes [SingleNamespace, MultiNamespace]",
150-
csv: MakeCSV(WithInstallModeSupportFor(v1alpha1.InstallModeTypeSingleNamespace)),
150+
csv: MakeCSV(WithInstallModeSupportFor(v1alpha1.InstallModeTypeSingleNamespace, v1alpha1.InstallModeTypeMultiNamespace)),
151151
expectedErrMsgFragment: "at least one target namespace must be specified",
152152
},
153153
} {

0 commit comments

Comments
 (0)