mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-02 19:47:54 +00:00
backport of commit d5f4243c9e (#23162)
Co-authored-by: Hamid Ghaf <83242695+hghaf099@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
6d3f5c3352
commit
31b83d7dac
@@ -1193,12 +1193,13 @@ func TestProxy_Config_ReloadTls(t *testing.T) {
|
||||
logger := logging.NewVaultLogger(hclog.Trace)
|
||||
ui, cmd := testProxyCommand(t, logger)
|
||||
|
||||
var output string
|
||||
var code int
|
||||
wg.Add(1)
|
||||
args := []string{"-config", configFile.Name()}
|
||||
go func() {
|
||||
if code := cmd.Run(args); code != 0 {
|
||||
output := ui.ErrorWriter.String() + ui.OutputWriter.String()
|
||||
t.Errorf("got a non-zero exit status: %s", output)
|
||||
if code = cmd.Run(args); code != 0 {
|
||||
output = ui.ErrorWriter.String() + ui.OutputWriter.String()
|
||||
}
|
||||
wg.Done()
|
||||
}()
|
||||
@@ -1265,6 +1266,9 @@ func TestProxy_Config_ReloadTls(t *testing.T) {
|
||||
|
||||
// Shut down
|
||||
cmd.ShutdownCh <- struct{}{}
|
||||
|
||||
wg.Wait()
|
||||
|
||||
if code != 0 {
|
||||
t.Fatalf("got a non-zero exit status: %d, stdout/stderr: %s", code, output)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user