|
|
@ -1,6 +1,7 @@
|
|
|
|
package ca
|
|
|
|
package ca
|
|
|
|
|
|
|
|
|
|
|
|
import (
|
|
|
|
import (
|
|
|
|
|
|
|
|
"errors"
|
|
|
|
"fmt"
|
|
|
|
"fmt"
|
|
|
|
"io/ioutil"
|
|
|
|
"io/ioutil"
|
|
|
|
"os"
|
|
|
|
"os"
|
|
|
@ -160,7 +161,7 @@ func runTestVault(t testing.T) (*TestVaultServer, error) {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
t.Cleanup(func() {
|
|
|
|
t.Cleanup(func() {
|
|
|
|
if err := testVault.Stop(); err != nil {
|
|
|
|
if err := testVault.Stop(); err != nil {
|
|
|
|
t.Log("failed to stop vault server: %w", err)
|
|
|
|
t.Logf("failed to stop vault server: %v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
})
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
@ -207,7 +208,7 @@ func (v *TestVaultServer) Stop() error {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if v.cmd.Process != nil {
|
|
|
|
if v.cmd.Process != nil {
|
|
|
|
if err := v.cmd.Process.Signal(os.Interrupt); err != nil {
|
|
|
|
if err := v.cmd.Process.Signal(os.Interrupt); err != nil && !errors.Is(err, os.ErrProcessDone) {
|
|
|
|
return fmt.Errorf("failed to kill vault server: %v", err)
|
|
|
|
return fmt.Errorf("failed to kill vault server: %v", err)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|