mirror of
https://github.com/wahyd4/kt-connect.git
synced 2026-08-09 05:16:02 +10:00
fixed unused variable code issue
This commit is contained in:
+3
-3
@@ -34,14 +34,14 @@ func runCmd(cmd *exec.Cmd, name string, debug bool) (err error) {
|
||||
var stdoutBuf, stderrBuf bytes.Buffer
|
||||
stdoutIn, _ := cmd.StdoutPipe()
|
||||
stderrIn, _ := cmd.StderrPipe()
|
||||
var errStdout, errStderr error
|
||||
// var errStdout, errStderr error
|
||||
stdout := io.MultiWriter(os.Stdout, &stdoutBuf)
|
||||
stderr := io.MultiWriter(os.Stderr, &stderrBuf)
|
||||
go func() {
|
||||
_, errStdout = io.Copy(stdout, stdoutIn)
|
||||
_, _ = io.Copy(stdout, stdoutIn)
|
||||
}()
|
||||
go func() {
|
||||
_, errStderr = io.Copy(stderr, stderrIn)
|
||||
_, _ = io.Copy(stderr, stderrIn)
|
||||
}()
|
||||
|
||||
err = cmd.Start()
|
||||
|
||||
@@ -2,20 +2,21 @@ package integration
|
||||
|
||||
import (
|
||||
"testing"
|
||||
"github.com/urfave/cli"
|
||||
"github.com/alibaba/kt-connect/pkg/kt/options"
|
||||
|
||||
"github.com/alibaba/kt-connect/pkg/kt/command"
|
||||
"github.com/alibaba/kt-connect/pkg/kt/options"
|
||||
"github.com/urfave/cli"
|
||||
)
|
||||
|
||||
func Test_should(t *testing.T) {
|
||||
func Test_shouldCheckLocalDenpendencies(t *testing.T) {
|
||||
args := []string{"ktctl", "check"}
|
||||
options := options.NewDaemonOptions()
|
||||
app := cli.NewApp()
|
||||
app.Commands = []cli.Command {
|
||||
app.Commands = []cli.Command{
|
||||
command.NewCheckCommand(options),
|
||||
}
|
||||
}
|
||||
err := app.Run(args)
|
||||
if err != nil {
|
||||
t.Errorf("%s failed: %v", args, err)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user