036eb508df
* Update TestRouteID tests This commit updates the TestRouteID tests to be more simple without reducing test coverage. It also adds new cases that show a bug in the existing code where conflicting IDs can be returned. Signed-off-by: George Robinson <george.robinson@grafana.com> * Fix Route.ID() returns conflicting IDs This commit fixes a bug where Route.ID() returns conflicting IDs. For example, the configuration: receiver: test routes: - matchers: - foo=bar continue: true routes: - matchers: - bar=baz - matchers: - foo=bar continue: true routes: - matchers: - bar=baz Gives the following Route IDs: {} {}/{foo="bar"}/0 {}/{foo="bar"}/{bar="baz"}/0 {}/{foo="bar"}/1 {}/{foo="bar"}/{bar="baz"}/0 When it should give these Route IDs: {} {}/{foo="bar"}/0 {}/{foo="bar"}/0/{bar="baz"}/0 {}/{foo="bar"}/1 {}/{foo="bar"}/1/{bar="baz"}/0 Signed-off-by: George Robinson <george.robinson@grafana.com> --------- Signed-off-by: George Robinson <george.robinson@grafana.com> |
||
---|---|---|
.. | ||
dispatch.go | ||
dispatch_test.go | ||
route.go | ||
route_test.go |