Skip to content

Adds default channel to the CreateFBC helper #354

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions test/operator-framework-e2e/create_fbc_helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (

// Forms the FBC declartive config and creates the FBC by calling functions for forming the package, channel and bundles.
func CreateFBC(operatorName, channelName string, bundleRefsVersions map[string]string) *declcfg.DeclarativeConfig {
dPackage := formPackage(operatorName)
dPackage := formPackage(operatorName, channelName)
bundleVersions := make([]string, 0)
for _, bundleVersion := range bundleRefsVersions {
bundleVersions = append(bundleVersions, bundleVersion)
Expand All @@ -37,10 +37,11 @@ func CreateFBC(operatorName, channelName string, bundleRefsVersions map[string]s
}

// Forms package schema for the FBC
func formPackage(pkgName string) declcfg.Package {
func formPackage(pkgName, defaultChannelName string) declcfg.Package {
packageFormed := declcfg.Package{
Schema: declcfg.SchemaPackage,
Name: pkgName,
Schema: declcfg.SchemaPackage,
Name: pkgName,
DefaultChannel: defaultChannelName,
}
return packageFormed
}
Expand Down