Skip to content

Commit

Permalink
Check if the plugins config file exists
Browse files Browse the repository at this point in the history
  • Loading branch information
mostafa committed Jan 27, 2024
1 parent b47923a commit 60f810f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cmd/run_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ func Test_runCmdWithMultiTenancy(t *testing.T) {
}

func Test_runCmdWithCachePlugin(t *testing.T) {
globalTestConfigFile := "./test_global_runCmdWithCachePlugin.yaml"
pluginTestConfigFile := "./test_plugins_runCmdWithCachePlugin.yaml"
globalTestConfigFile := "test_global_runCmdWithCachePlugin.yaml"
pluginTestConfigFile := "test_plugins_runCmdWithCachePlugin.yaml"
// TODO: Remove this once these global variables are removed from cmd/run.go.
// https://github.com/gatewayd-io/gatewayd/issues/324
stopChan = make(chan struct{})
Expand Down Expand Up @@ -210,6 +210,8 @@ func Test_runCmdWithCachePlugin(t *testing.T) {
assert.Contains(t, output, "Plugin binary extracted to plugins/gatewayd-plugin-cache")
assert.Contains(t, output, "Plugin installed successfully")

require.FileExists(t, pluginTestConfigFile, "plugin install command should have created a config file")

// See if the plugin was actually installed.
output, err = executeCommandC(rootCmd, "plugin", "list", "-p", pluginTestConfigFile)
require.NoError(t, err, "plugin list should not return an error")
Expand Down

0 comments on commit 60f810f

Please sign in to comment.