Fix tests using multiple controllers (#1734)
The previous PR only initialized plugins if they were required, which meant that there may not actually be a plugin manager running because a second node would not actually create the dev database, which is where the plugin was being added. The assumption that a plugin manager is running is still a fine one at the moment, but we just need to make sure it's running in _all_ cases.
This commit is contained in:
1 parent
ad8ce50f69
commit
95568ef07f
5 files changed
+17
-17
No files matched your search
@@ -16,7 +16,6 @@ import (
|
||||
"github.com/hashicorp/boundary/internal/iam"
|
||||
"github.com/hashicorp/boundary/internal/kms"
|
||||
"github.com/hashicorp/boundary/internal/observability/event"
|
||||
hostplugin "github.com/hashicorp/boundary/internal/plugin/host"
|
||||
"github.com/hashicorp/boundary/internal/types/scope"
|
||||
"github.com/hashicorp/boundary/testing/dbtest"
|
||||
capoidc "github.com/hashicorp/cap/oidc"
|
||||
@@ -143,18 +142,6 @@ func (b *Server) CreateDevDatabase(ctx context.Context, opt ...Option) error {
|
||||
return err
|
||||
}
|
||||
|
||||
if opts.withHostPlugin != nil {
|
||||
pluginId, plg := opts.withHostPlugin()
|
||||
b.DevLoopbackHostPluginId = pluginId
|
||||
opts := []hostplugin.Option{
|
||||
hostplugin.WithDescription("Provides an initial loopback host plugin in Boundary"),
|
||||
hostplugin.WithPublicId(b.DevLoopbackHostPluginId),
|
||||
}
|
||||
if _, err = b.RegisterHostPlugin(ctx, "loopback", plg, opts...); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
if opts.withSkipHostResourcesCreation {
|
||||
// now that we have passed all the error cases, reset c to be a noop so the
|
||||
// defer doesn't do anything.
|
||||
|
||||
Reference in new issue
Block a user