diff --git a/cli/metrics/commands.go b/cli/metrics/commands.go index e6d7ff6b6..f872b36cb 100644 --- a/cli/metrics/commands.go +++ b/cli/metrics/commands.go @@ -49,6 +49,7 @@ var managementCommands = []string{ "plugin", "sbom", "scan", + "scout", "secret", "service", "signer", @@ -77,6 +78,7 @@ var commands = []string{ "convert", "cp", "create", + "cves", "debug", "demote", "deploy", diff --git a/cli/metrics/metrics_test.go b/cli/metrics/metrics_test.go index 48aeb0223..6643f7cbf 100644 --- a/cli/metrics/metrics_test.go +++ b/cli/metrics/metrics_test.go @@ -386,3 +386,29 @@ func TestBuild(t *testing.T) { }) } } + +func TestScout(t *testing.T) { + testCases := []struct { + name string + args []string + expected string + }{ + { + name: "scout", + args: []string{"scout"}, + expected: "scout", + }, + { + name: "scout - cves ", + args: []string{"scout", "cves", "alpine"}, + expected: "scout cves", + }, + } + + for _, testCase := range testCases { + t.Run(testCase.name, func(t *testing.T) { + result := GetCommand(testCase.args) + assert.Equal(t, testCase.expected, result) + }) + } +}