add the missing parameter 'name' into SpawnCmdWithLogger for cov test
@@ -36,7 +36,7 @@ var (
coverDir = integration.MustAbsPath(os.Getenv("COVERDIR"))
)
-func SpawnCmdWithLogger(lg *zap.Logger, args []string, envVars map[string]string) (*expect.ExpectProcess, error) {
+func SpawnCmdWithLogger(lg *zap.Logger, args []string, envVars map[string]string, name string) (*expect.ExpectProcess, error) {
cmd := args[0]
env := mergeEnvVariables(envVars)
switch {
@@ -63,9 +63,13 @@ func SpawnCmdWithLogger(lg *zap.Logger, args []string, envVars map[string]string
// when withFlagByEnv() is used in testCtl(), env variables for ctl is set to os.env.
// they must be included in ctl_cov_env.
- all_args := append(args[1:], covArgs...)
- lg.Info("spawning process", zap.Strings("args", all_args), zap.String("working-dir", wd))
- ep, err := expect.NewExpectWithEnv(cmd, all_args, env)
+ allArgs := append(args[1:], covArgs...)
+ lg.Info("spawning process in cov test",
+ zap.Strings("args", args),
+ zap.String("working-dir", wd),
+ zap.String("name", name),
+ zap.Strings("environment-variables", env))
+ ep, err := expect.NewExpectWithEnv(cmd, allArgs, env, name)
if err != nil {
return nil, err
}
