mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-01 02:57:59 +00:00
Add test for HA availability to command/server
This commit is contained in:
@@ -267,17 +267,6 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
lns = append(lns, ln)
|
||||
}
|
||||
|
||||
if verifyOnly {
|
||||
return 0
|
||||
}
|
||||
|
||||
// Initialize the HTTP server
|
||||
server := &http.Server{}
|
||||
server.Handler = vaulthttp.Handler(core)
|
||||
for _, ln := range lns {
|
||||
go server.Serve(ln)
|
||||
}
|
||||
|
||||
infoKeys = append(infoKeys, "version")
|
||||
info["version"] = version.GetVersion().String()
|
||||
|
||||
@@ -293,6 +282,20 @@ func (c *ServerCommand) Run(args []string) int {
|
||||
}
|
||||
c.Ui.Output("")
|
||||
|
||||
if verifyOnly {
|
||||
for _, listener := range lns {
|
||||
listener.Close()
|
||||
}
|
||||
return 0
|
||||
}
|
||||
|
||||
// Initialize the HTTP server
|
||||
server := &http.Server{}
|
||||
server.Handler = vaulthttp.Handler(core)
|
||||
for _, ln := range lns {
|
||||
go server.Serve(ln)
|
||||
}
|
||||
|
||||
// Output the header that the server has started
|
||||
c.Ui.Output("==> Vault server started! Log data will stream in below:\n")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user