зеркало из https://github.com/docker/compose-cli.git
feat: scout command metrics
Signed-off-by: pvalverde <91528455+paco-valverde@users.noreply.github.com>
This commit is contained in:
Родитель
731d87bbc1
Коммит
97551730c0
|
@ -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)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче