From 17e271539a8e0e0ddb1c6f8497142afb63fe565f Mon Sep 17 00:00:00 2001 From: Pawel Kosiec Date: Tue, 30 Jan 2024 08:36:34 +0100 Subject: [PATCH] Fix Botkube installation `exec` config for the migration tests (#1363) --- test/e2e/migration_test.go | 5 +++-- test/helmx/helm_helpers.go | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/e2e/migration_test.go b/test/e2e/migration_test.go index 720226330..146a04521 100644 --- a/test/e2e/migration_test.go +++ b/test/e2e/migration_test.go @@ -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 \ @@ -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) { @@ -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, }, diff --git a/test/helmx/helm_helpers.go b/test/helmx/helm_helpers.go index e92f34b5b..41eecfa37 100644 --- a/test/helmx/helm_helpers.go +++ b/test/helmx/helm_helpers.go @@ -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()