mirror of
https://github.com/coder/coder.git
synced 2026-09-24 15:04:27 +08:00
test: use NATS in coderdtest by default (#27343)
Closes GRU-70 Enables NATS as the pubsub for `coderdtest` unless specifically overwritten by the test case.
This commit is contained in:
@@ -721,6 +721,12 @@ func New(ctx context.Context, options *Options) (_ *API, err error) {
|
||||
return nil, xerrors.Errorf("mount scim routes: %w", mountScimError)
|
||||
}
|
||||
|
||||
// The NATS pubsub, if enabled, used the Replica Manager for clustering. It's a layering violation if the pubsub
|
||||
// for the Replica Manager *is* the NATS pubsub, because then we have a dependency loop.
|
||||
if _, isNats := options.ReplicaSyncPubsub.(*nats.Pubsub); isNats {
|
||||
return nil, xerrors.Errorf("replica sync pubsub cannot be the NATS pubsub")
|
||||
}
|
||||
|
||||
// We always want to run the replica manager even if we don't have DERP
|
||||
// enabled, since it's used to detect other coder servers for licensing,
|
||||
// and NATS clustering for HA pubsub.
|
||||
|
||||
Reference in New Issue
Block a user