Skip to content

Commit

Permalink
Merge pull request #61 from victorcoder/fix-join
Browse files Browse the repository at this point in the history
Fix and test more than one join flags
  • Loading branch information
Victor Castell committed Dec 20, 2015
2 parents f517e2b + 88567fb commit e2201e2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions dkron/agent.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,8 @@ func (a *AgentCommand) readConfig(args []string) *Config {
cmdFlags.String("profile", "lan", "timing profile to use (lan, wan, local)")
viper.SetDefault("profile", cmdFlags.Lookup("profile").Value)
viper.SetDefault("server", cmdFlags.Bool("server", false, "start dkron server"))
startJoin := &AppendSliceValue{}
cmdFlags.Var(startJoin, "join", "address of agent to join on startup")
var startJoin []string
cmdFlags.Var((*AppendSliceValue)(&startJoin), "join", "address of agent to join on startup")
var tag []string
cmdFlags.Var((*AppendSliceValue)(&tag), "tag", "tag pair, specified as key=value")
cmdFlags.String("keyspace", "dkron", "key namespace to use")
Expand Down
3 changes: 2 additions & 1 deletion dkron/agent_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,8 @@ func TestAgentCommandElectLeader(t *testing.T) {

args2 := []string{
"-bind", a2Addr,
"-join", a1Addr,
"-join", a1Addr + ":8946",
"-join", a1Addr + ":8946",
"-node", "test2",
"-server",
"-debug",
Expand Down

0 comments on commit e2201e2

Please sign in to comment.