mirror of
https://github.com/vmware-tanzu/velero.git
synced 2026-01-05 13:05:17 +00:00
Fix linter error reported.
Some checks failed
Some checks failed
Signed-off-by: Xun Jiang <xun.jiang@broadcom.com>
This commit is contained in:
committed by
Xun Jiang/Bruce Jiang
parent
758f6a4847
commit
64e3643006
@@ -18,6 +18,7 @@ limitations under the License.
|
||||
package process
|
||||
|
||||
import (
|
||||
"context"
|
||||
"os"
|
||||
"os/exec"
|
||||
|
||||
@@ -78,7 +79,7 @@ func (b *clientBuilder) clientConfig() *hcplugin.ClientConfig {
|
||||
string(common.PluginKindItemBlockAction): ibav1.NewItemBlockActionPlugin(common.ClientLogger(b.clientLogger)),
|
||||
},
|
||||
Logger: b.pluginLogger,
|
||||
Cmd: exec.Command(b.commandName, b.commandArgs...), //nolint:gosec // Internal call. No need to check the command line.
|
||||
Cmd: exec.CommandContext(context.Background(), b.commandName, b.commandArgs...), //nolint:gosec // Internal call. No need to check the command line.
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -65,9 +65,11 @@ func TestClientConfig(t *testing.T) {
|
||||
string(common.PluginKindItemBlockAction): ibav1.NewItemBlockActionPlugin(common.ClientLogger(logger)),
|
||||
},
|
||||
Logger: cb.pluginLogger,
|
||||
Cmd: exec.Command(cb.commandName, cb.commandArgs...),
|
||||
Cmd: exec.CommandContext(t.Context(), cb.commandName, cb.commandArgs...),
|
||||
}
|
||||
|
||||
cc := cb.clientConfig()
|
||||
assert.Equal(t, expected, cc)
|
||||
assert.Equal(t, expected.HandshakeConfig, cc.HandshakeConfig)
|
||||
assert.Equal(t, expected.AllowedProtocols, cc.AllowedProtocols)
|
||||
assert.Equal(t, expected.Plugins, cc.Plugins)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user