Trap failure to create Vault instance in tests
When the Docker service isn't running, the test suite can't create a Vault instance. Trap this failure earlier in the test program to preclude panicking after tests relying on Vault have failed. Signed-off-by: Steven E. Harris <seh@panix.com>
This commit is contained in:
parent
e437cb83c2
commit
e665bccf89
|
@ -121,8 +121,11 @@ func runInContext(registerControllers func(*testenv.Environment), run func() err
|
|||
panic(fmt.Sprintf("Failed to create k8s client: %v", err))
|
||||
}
|
||||
|
||||
// Create a vault test instance
|
||||
// Create a Vault test instance.
|
||||
pool, resource, err := createVaultTestInstance()
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("Failed to create Vault instance: %v", err))
|
||||
}
|
||||
defer func() {
|
||||
pool.Purge(resource)
|
||||
}()
|
||||
|
|
Loading…
Reference in New Issue