Merge pull request #3066 from phanimarupaka/ImproveSetOutputMessage

Improve setter output message
This commit is contained in:
Kubernetes Prow Robot
2020-10-06 21:12:42 -07:00
committed by GitHub
2 changed files with 5 additions and 5 deletions

View File

@@ -173,7 +173,7 @@ func (r *SetRunner) executeCmd(w io.Writer, pkgPath string) error {
fmt.Fprintf(w, "%s\n", err.Error())
}
} else {
fmt.Fprintf(w, "set %d field(s)\n", count)
fmt.Fprintf(w, "set %d field(s) of setter %q to value %q\n", count, r.Set.Name, r.Set.Value)
}
return nil
}

View File

@@ -1094,13 +1094,13 @@ func TestSetSubPackages(t *testing.T) {
dataset: "dataset-with-setters",
args: []string{"namespace", "otherspace", "-R"},
expected: `${baseDir}/mysql/
set 1 field(s)
set 1 field(s) of setter "namespace" to value "otherspace"
${baseDir}/mysql/nosetters/
setter "namespace" is not found
${baseDir}/mysql/storage/
set 1 field(s)
set 1 field(s) of setter "namespace" to value "otherspace"
`,
},
{
@@ -1109,7 +1109,7 @@ set 1 field(s)
packagePath: "mysql",
args: []string{"namespace", "otherspace"},
expected: `${baseDir}/mysql/
set 1 field(s)
set 1 field(s) of setter "namespace" to value "otherspace"
`,
},
{
@@ -1118,7 +1118,7 @@ set 1 field(s)
packagePath: "mysql/storage",
args: []string{"namespace", "otherspace"},
expected: `${baseDir}/mysql/storage/
set 1 field(s)
set 1 field(s) of setter "namespace" to value "otherspace"
`,
},
}