mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-11-03 20:17:59 +00:00
test/plugin: test external database plugin workflows (#19191)
* test/plugin: test external db plugin * use test helper to get cluster and plugins * create test helper to create a vault admin user * add step to revoke lease * make tests parallel and add reload test * use more descriptive name for test group; check response
This commit is contained in:
committed by
GitHub
parent
165aff5f00
commit
c2f86ccd2f
@@ -71,13 +71,17 @@ func CompilePlugin(t testing.T, typ consts.PluginType, pluginVersion string, plu
|
||||
|
||||
dir := ""
|
||||
var err error
|
||||
pluginRootDir := "builtin"
|
||||
if typ == consts.PluginTypeDatabase {
|
||||
pluginRootDir = "plugins"
|
||||
}
|
||||
for {
|
||||
dir, err = os.Getwd()
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
// detect if we are in a subdirectory or the root directory and compensate
|
||||
if _, err := os.Stat("builtin"); os.IsNotExist(err) {
|
||||
if _, err := os.Stat(pluginRootDir); os.IsNotExist(err) {
|
||||
err := os.Chdir("..")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user