open-nomad/nomad/stream
Isabel Suchanek ab51050ce8
events: fix wildcard namespace handling (#10935)
This fixes a bug in the event stream API where it currently interprets
namespace=* as an actual namespace, not a wildcard. When Nomad parses
incoming requests, it sets namespace to default if not specified, which
means the request namespace will never be an empty string, which is what
the event subscription was checking for. This changes the conditional
logic to check for a wildcard namespace instead of an empty one.

It also updates some event tests to include the default namespace in the
subscription to match current behavior.

Fixes #10903
2021-09-02 09:36:55 -07:00
..
event_broker.go
event_broker_test.go events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
event_buffer.go
event_buffer_test.go
ndjson.go
ndjson_test.go
subscription.go events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00
subscription_test.go events: fix wildcard namespace handling (#10935) 2021-09-02 09:36:55 -07:00