Skip to content

Commit

Permalink
plugin threshold 1
Browse files Browse the repository at this point in the history
  • Loading branch information
huseyinbabal committed Sep 21, 2023
1 parent 16d225c commit 9e04ee8
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 16 deletions.
19 changes: 11 additions & 8 deletions test/botkubex/botkube_cli_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ import (
)

type InstallParams struct {
BinaryPath string
HelmRepoDirectory string
ConfigProviderEndpoint string
ConfigProviderIdentifier string
ConfigProviderAPIKey string
ImageRegistry string
ImageRepository string
ImageTag string
BinaryPath string
HelmRepoDirectory string
ConfigProviderEndpoint string
ConfigProviderIdentifier string
ConfigProviderAPIKey string
ImageRegistry string
ImageRepository string
ImageTag string
PluginRestartPolicyThreshold int
}

func Install(t *testing.T, params InstallParams) error {
Expand All @@ -39,6 +40,8 @@ func Install(t *testing.T, params InstallParams) error {
"--set",
fmt.Sprintf("config.provider.identifier=%s", params.ConfigProviderIdentifier),
"--set",
fmt.Sprintf("plugins.restartPolicy.threshold=%d", params.PluginRestartPolicyThreshold),
"--set",
fmt.Sprintf("config.provider.apiKey=%s", params.ConfigProviderAPIKey))
t.Logf("Executing command: %s", cmd.String())
cmd.Env = os.Environ()
Expand Down
17 changes: 9 additions & 8 deletions test/e2e/bots_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -239,14 +239,15 @@ func runBotTest(t *testing.T,
})

err = botkubex.Install(t, botkubex.InstallParams{
BinaryPath: appCfg.ConfigProvider.BotkubeCliBinaryPath,
HelmRepoDirectory: appCfg.ConfigProvider.HelmRepoDirectory,
ConfigProviderEndpoint: appCfg.ConfigProvider.Endpoint,
ConfigProviderIdentifier: deployment.ID,
ConfigProviderAPIKey: deployment.APIKey.Value,
ImageTag: appCfg.ConfigProvider.ImageTag,
ImageRegistry: appCfg.ConfigProvider.ImageRegistry,
ImageRepository: appCfg.ConfigProvider.ImageRepository,
BinaryPath: appCfg.ConfigProvider.BotkubeCliBinaryPath,
HelmRepoDirectory: appCfg.ConfigProvider.HelmRepoDirectory,
ConfigProviderEndpoint: appCfg.ConfigProvider.Endpoint,
ConfigProviderIdentifier: deployment.ID,
ConfigProviderAPIKey: deployment.APIKey.Value,
ImageTag: appCfg.ConfigProvider.ImageTag,
ImageRegistry: appCfg.ConfigProvider.ImageRegistry,
ImageRepository: appCfg.ConfigProvider.ImageRepository,
PluginRestartPolicyThreshold: 1,
})
require.NoError(t, err)
t.Cleanup(func() {
Expand Down

0 comments on commit 9e04ee8

Please sign in to comment.