Skip to content

Commit

Permalink
chore(config): fix command line flag name typo
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielcorado committed Sep 2, 2024
1 parent 565c4d5 commit 8d9c077
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions lib/config/configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ type CommandLineFlags struct {
ProfileSeconds int

// DisableDebugService disables the debug service.
DisabledDebugService bool
DisableDebugService bool
}

// IntegrationConfAccessGraphAWSSync contains the arguments of
Expand Down Expand Up @@ -2650,7 +2650,7 @@ func Configure(clf *CommandLineFlags, cfg *servicecfg.Config, legacyAppFlags boo
}
}

if clf.DisabledDebugService {
if clf.DisableDebugService {
cfg.DebugService.Enabled = false
}

Expand Down
4 changes: 2 additions & 2 deletions lib/config/configuration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5013,7 +5013,7 @@ func TestDebugServiceConfig(t *testing.T) {
"enabled by default": {configFile: "", expectDebugServiceEnabled: true},
"disabled by commandline": {
configFile: "",
commandLineFlags: &CommandLineFlags{DisabledDebugService: true},
commandLineFlags: &CommandLineFlags{DisableDebugService: true},
expectDebugServiceEnabled: false,
},
"disabled by configuration": {
Expand All @@ -5028,7 +5028,7 @@ debug_service:
debug_service:
enabled: "yes"
`,
commandLineFlags: &CommandLineFlags{DisabledDebugService: true},
commandLineFlags: &CommandLineFlags{DisableDebugService: true},
expectDebugServiceEnabled: false,
},
} {
Expand Down
6 changes: 3 additions & 3 deletions tool/teleport/common/teleport.go
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con
start.Flag("db-aws-region",
"AWS region AWS hosted database instance is running in.").Hidden().
StringVar(&ccf.DatabaseAWSRegion)
start.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisabledDebugService)
start.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisableDebugService)

// define start's usage info (we use kingpin's "alias" field for this)
start.Alias(usageNotes + usageExamples)
Expand All @@ -219,7 +219,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con
appStartCmd.Flag("diag-addr", "Start diagnostic prometheus and healthz endpoint.").StringVar(&ccf.DiagnosticAddr)
appStartCmd.Flag("insecure", "Insecure mode disables certificate validation").BoolVar(&ccf.InsecureMode)
appStartCmd.Flag("skip-version-check", "Skip version checking between server and client.").Default("false").BoolVar(&ccf.SkipVersionCheck)
appStartCmd.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisabledDebugService)
appStartCmd.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisableDebugService)
appStartCmd.Alias(appUsageExamples) // We're using "alias" section to display usage examples.

// "teleport db" command and its subcommands
Expand Down Expand Up @@ -256,7 +256,7 @@ func Run(options Options) (app *kingpin.Application, executedCommand string, con
dbStartCmd.Flag("diag-addr", "Start diagnostic prometheus and healthz endpoint.").StringVar(&ccf.DiagnosticAddr)
dbStartCmd.Flag("insecure", "Insecure mode disables certificate validation").BoolVar(&ccf.InsecureMode)
dbStartCmd.Flag("skip-version-check", "Skip version checking between server and client.").Default("false").BoolVar(&ccf.SkipVersionCheck)
dbStartCmd.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisabledDebugService)
dbStartCmd.Flag("no-debug-service", "Disables debug service.").BoolVar(&ccf.DisableDebugService)
dbStartCmd.Alias(dbUsageExamples) // We're using "alias" section to display usage examples.

dbConfigure := dbCmd.Command("configure", "Bootstraps database service configuration and cloud permissions.")
Expand Down

0 comments on commit 8d9c077

Please sign in to comment.