Skip to content

Commit

Permalink
Fix Botkube installation exec config for the migration tests (#1363)
Browse files Browse the repository at this point in the history
  • Loading branch information
pkosiec authored Jan 30, 2024
1 parent 2151cf3 commit 17e2715
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions test/e2e/migration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const (
--set settings.clusterName=%s \
--set executors.k8s-default-tools.botkube/kubectl.enabled=true \
--set executors.k8s-default-tools.botkube/helm.enabled=true \
--set executors.bins-management.botkube/exec.config.templates[0].ref=github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main \
--set analytics.disable=true \
--set image.tag=v9.99.9-dev \
--set plugins.repositories.botkube.url=https://storage.googleapis.com/botkube-plugins-latest/plugins-index.yaml \
Expand Down Expand Up @@ -118,7 +119,7 @@ func TestBotkubeMigration(t *testing.T) {
Namespace: "botkube",
Command: cmd,
}
helmInstallCallback := helmx.InstallChart(t, params) // TODO: Fix - do not install static Botkube version
helmInstallCallback := helmx.InstallChart(t, params)
t.Cleanup(func() { helmInstallCallback(t) })

t.Run("Check if Botkube is running before migration", func(t *testing.T) {
Expand Down Expand Up @@ -449,7 +450,7 @@ func assertPlugins(t *testing.T, actual []*gqlModel.Plugin) {
DisplayName: "botkube/exec",
Type: "EXECUTOR",
ConfigurationName: "bins-management",
Configuration: "{\"templates\":[{\"ref\":\"github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=v1.7.0\"}]}",
Configuration: "{\"templates\":[{\"ref\":\"github.com/kubeshop/botkube//cmd/executor/exec/templates?ref=main\"}]}",
Enabled: false,
Rbac: defaultRBAC,
},
Expand Down
2 changes: 1 addition & 1 deletion test/helmx/helm_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func InstallChart(t *testing.T, params InstallChartParams) func(t *testing.T) {
t.Logf("Found version: %s", latestVersion)

helmOpts := params.ToOptions(latestVersion)
t.Logf("Installing chart %s with command %s", params.Name, helmOpts)
t.Logf("Installing chart %s with parameters %+v", params.Name, helmOpts)
//nolint:gosec // this is not production code
cmd = exec.Command("helm", helmOpts...)
installOutput, err := cmd.CombinedOutput()
Expand Down

0 comments on commit 17e2715

Please sign in to comment.