mirror of
https://github.com/featurebasedb/featurebase.git
synced 2026-09-11 07:11:02 +00:00
add replicaN to pilosa server and test
This commit is contained in:
parent
372b7ca1c4
commit
2af42eedb5
2 changed files with 7 additions and 2 deletions
|
|
@ -75,8 +75,9 @@ on the configured port.`,
|
|||
flags := serveCmd.Flags()
|
||||
|
||||
flags.StringVarP(&Serve.ConfigPath, "config", "c", "", "Configuration file to read from.")
|
||||
flags.StringVarP(&Serve.Config.Host, "host", "", ":10101", "Default URI on which pilosa should listen.")
|
||||
flags.StringVarP(&Serve.Config.DataDir, "data-dir", "d", "~/.pilosa", "Directory to store pilosa data files.")
|
||||
flags.StringVarP(&Serve.Config.Host, "bind", "", ":10101", "Default URI on which pilosa should listen.")
|
||||
flags.IntVarP(&Serve.Config.Cluster.ReplicaN, "cluster.replicas", "", 1, "Number hosts each piece of data should be stored on.")
|
||||
flags.StringVarP(&Serve.CPUProfile, "cpu-profile", "", "", "Where to store CPU profile.")
|
||||
flags.DurationVarP(&Serve.CPUTime, "cpu-time", "", 30*time.Second, "CPU profile duration.")
|
||||
|
||||
|
|
|
|||
|
|
@ -51,12 +51,16 @@ func TestServerConfig(t *testing.T) {
|
|||
env: map[string]string{"PILOSA_DATA_DIR": "/tmp/myEnvDatadir"},
|
||||
cfgFileContent: `
|
||||
data-dir = "/tmp/myFileDatadir"
|
||||
host = "localhost:0"
|
||||
bind = "localhost:0"
|
||||
|
||||
[cluster]
|
||||
replicas = 2
|
||||
`,
|
||||
validation: func() error {
|
||||
v := validator{}
|
||||
v.Check(cmd.Serve.Config.DataDir, actualDataDir)
|
||||
v.Check(cmd.Serve.Config.Host, "localhost:0")
|
||||
v.Check(cmd.Serve.Config.Cluster.ReplicaN, 2)
|
||||
return v.Error()
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue