Skip to content

Commit 718cfa4

Browse files
author
Mikalai Radchuk
committed
Adds default channel to the CreateFBC helper
Signed-off-by: Mikalai Radchuk <[email protected]>
1 parent fd7cfb5 commit 718cfa4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

test/operator-framework-e2e/create_fbc_helper.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ const (
1919

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

3939
// Forms package schema for the FBC
40-
func formPackage(pkgName string) declcfg.Package {
40+
func formPackage(pkgName, defaultChannelName string) declcfg.Package {
4141
packageFormed := declcfg.Package{
42-
Schema: declcfg.SchemaPackage,
43-
Name: pkgName,
42+
Schema: declcfg.SchemaPackage,
43+
Name: pkgName,
44+
DefaultChannel: defaultChannelName,
4445
}
4546
return packageFormed
4647
}

0 commit comments

Comments
 (0)