зеркало из https://github.com/docker/compose-cli.git
Merge pull request #2240 from paco-valverde/scout-command-metrics
metrics: scout command usage
This commit is contained in:
Коммит
9ef8facb00
|
@ -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",
|
||||
|
|
|
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче