mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 18:17:55 +00:00
Add a -dev-three-node option for devs. (#3081)
This commit is contained in:
@@ -58,8 +58,8 @@ disable_mlock = true
|
||||
|
||||
listener "tcp" {
|
||||
address = "127.0.0.1:8203"
|
||||
tls_cert_file = "TMPDIR/reload_FILE.pem"
|
||||
tls_key_file = "TMPDIR/reload_FILE.key"
|
||||
tls_cert_file = "TMPDIR/reload_cert.pem"
|
||||
tls_key_file = "TMPDIR/reload_key.pem"
|
||||
}
|
||||
`
|
||||
)
|
||||
@@ -79,15 +79,11 @@ func TestServer_ReloadListener(t *testing.T) {
|
||||
|
||||
// Setup initial certs
|
||||
inBytes, _ := ioutil.ReadFile(wd + "reload_foo.pem")
|
||||
ioutil.WriteFile(td+"/reload_foo.pem", inBytes, 0777)
|
||||
ioutil.WriteFile(td+"/reload_cert.pem", inBytes, 0777)
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_foo.key")
|
||||
ioutil.WriteFile(td+"/reload_foo.key", inBytes, 0777)
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_bar.pem")
|
||||
ioutil.WriteFile(td+"/reload_bar.pem", inBytes, 0777)
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_bar.key")
|
||||
ioutil.WriteFile(td+"/reload_bar.key", inBytes, 0777)
|
||||
ioutil.WriteFile(td+"/reload_key.pem", inBytes, 0777)
|
||||
|
||||
relhcl := strings.Replace(strings.Replace(reloadhcl, "TMPDIR", td, -1), "FILE", "foo", -1)
|
||||
relhcl := strings.Replace(reloadhcl, "TMPDIR", td, -1)
|
||||
ioutil.WriteFile(td+"/reload.hcl", []byte(relhcl), 0777)
|
||||
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_ca.pem")
|
||||
@@ -155,7 +151,11 @@ func TestServer_ReloadListener(t *testing.T) {
|
||||
t.Fatalf("certificate name didn't check out: %s", err)
|
||||
}
|
||||
|
||||
relhcl = strings.Replace(strings.Replace(reloadhcl, "TMPDIR", td, -1), "FILE", "bar", -1)
|
||||
relhcl = strings.Replace(reloadhcl, "TMPDIR", td, -1)
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_bar.pem")
|
||||
ioutil.WriteFile(td+"/reload_cert.pem", inBytes, 0777)
|
||||
inBytes, _ = ioutil.ReadFile(wd + "reload_bar.key")
|
||||
ioutil.WriteFile(td+"/reload_key.pem", inBytes, 0777)
|
||||
ioutil.WriteFile(td+"/reload.hcl", []byte(relhcl), 0777)
|
||||
|
||||
c.SighupCh <- struct{}{}
|
||||
|
||||
Reference in New Issue
Block a user