test: replace deprecated subcommand client in integration tests (#2308)

This commit is contained in:
afdesk
2022-06-12 23:38:55 +06:00
committed by GitHub
parent efbc968ca8
commit b213956cea

View File

@@ -564,10 +564,10 @@ func setupServer(addr, token, tokenHeader, cacheDir, cacheBackend string) []stri
func setupClient(t *testing.T, c csArgs, addr string, cacheDir string, golden string) ([]string, string) { func setupClient(t *testing.T, c csArgs, addr string, cacheDir string, golden string) ([]string, string) {
if c.Command == "" { if c.Command == "" {
c.Command = "client" c.Command = "image"
} }
if c.RemoteAddrOption == "" { if c.RemoteAddrOption == "" {
c.RemoteAddrOption = "--remote" c.RemoteAddrOption = "--server"
} }
t.Helper() t.Helper()
osArgs := []string{"trivy", "--cache-dir", cacheDir, c.Command, c.RemoteAddrOption, "http://" + addr} osArgs := []string{"trivy", "--cache-dir", cacheDir, c.Command, c.RemoteAddrOption, "http://" + addr}