Merge pull request #71009 from timothysc/phaseflow

Fixup language on help message to denote phases
pull/58/head
k8s-ci-robot 2018-11-14 09:26:20 -08:00 committed by GitHub
commit ba7d3c3ba8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 5 deletions

View File

@ -35,7 +35,7 @@ import (
var ( var (
bootstrapTokenLongDesc = normalizer.LongDesc(` bootstrapTokenLongDesc = normalizer.LongDesc(`
Bootstrap tokens are used for establishing bidirectional trust between a node joining Bootstrap tokens are used for establishing bidirectional trust between a node joining
the cluster and a the master node. the cluster and a the control-plane node.
This command makes all the configurations required to make bootstrap tokens works This command makes all the configurations required to make bootstrap tokens works
and then creates an initial token. and then creates an initial token.
@ -61,8 +61,9 @@ func NewBootstrapTokenPhase() workflow.Phase {
return workflow.Phase{ return workflow.Phase{
Name: "bootstrap-token", Name: "bootstrap-token",
Aliases: []string{"bootstraptoken"}, Aliases: []string{"bootstraptoken"},
Short: bootstrapTokenLongDesc, Short: "Generates bootstrap tokens used to join a node to a cluster",
Long: bootstrapTokenExamples, Example: bootstrapTokenExamples,
Long: bootstrapTokenLongDesc,
CmdFlags: []string{ CmdFlags: []string{
options.CfgPath, options.CfgPath,
options.KubeconfigDir, options.KubeconfigDir,

View File

@ -250,7 +250,7 @@ func (e *Runner) Help(cmdUse string) string {
// prints the list of phases indented by level and formatted using the maxlength // prints the list of phases indented by level and formatted using the maxlength
// the list is enclosed in a mardown code block for ensuring better readability in the public web site // the list is enclosed in a mardown code block for ensuring better readability in the public web site
line := fmt.Sprintf("The %q command executes the following internal workflow:\n", cmdUse) line := fmt.Sprintf("The %q command executes the following phases:\n", cmdUse)
line += "```\n" line += "```\n"
offset := 2 offset := 2
e.visitAll(func(p *phaseRunner) error { e.visitAll(func(p *phaseRunner) error {

View File

@ -269,7 +269,7 @@ func TestHelp(t *testing.T) {
}, },
} }
expected := "The \"myCommand\" command executes the following internal workflow:\n" + expected := "The \"myCommand\" command executes the following phases:\n" +
"```\n" + "```\n" +
"foo long description for foo ...\n" + "foo long description for foo ...\n" +
" /bar long description for bar ...\n" + " /bar long description for bar ...\n" +