Skip to content

Commit

Permalink
[3503] adding consul-address flag to command.go
Browse files Browse the repository at this point in the history
fixing
  • Loading branch information
james-powis committed Nov 4, 2017
1 parent 0b3476a commit f559f7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions command/agent/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,7 @@ func (c *Command) readConfig() *Config {
cmdConfig.Consul.VerifySSL = &b
return nil
}), "consul-verify-ssl", "")
flags.StringVar(&cmdConfig.Consul.Addr, "consul-address", "", "")

// Vault options
flags.Var((flaghelper.FuncBoolVar)(func(b bool) error {
Expand Down
4 changes: 4 additions & 0 deletions command/agent/command_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ func TestCommand_Args(t *testing.T) {
[]string{"-client", "-alloc-dir="},
"Must specify both the state and alloc dir if data-dir is omitted.",
},
{
[]string{"-client", "-consul-address=1.2.3.4:8500"},
"No configuration files loaded",
},
}
for _, tc := range tcases {
// Make a new command. We pre-emptively close the shutdownCh
Expand Down

0 comments on commit f559f7e

Please sign in to comment.