-
Notifications
You must be signed in to change notification settings - Fork 21
/
Copy pathplugin_test.go
35 lines (28 loc) · 953 Bytes
/
plugin_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package cmd
import (
"testing"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
)
func Test_pluginCmd(t *testing.T) {
// Test pluginCmd with no arguments.
output, err := executeCommandC(rootCmd, "plugin")
require.NoError(t, err, "pluginCmd should not return an error")
assert.Equal(t, `Manage plugins and their configuration
Usage:
gatewayd plugin [flags]
gatewayd plugin [command]
Available Commands:
help Help about any command
init Create or overwrite the GatewayD plugins config
install Install a plugin from a local archive or a GitHub repository
lint Lint the GatewayD plugins config
list List the GatewayD plugins
scaffold Scaffold a plugin and store the files into a directory
Flags:
-h, --help help for plugin
Use "gatewayd plugin [command] --help" for more information about a command.
`,
output,
"pluginCmd should print the correct output")
}