26 Commits

Author SHA1 Message Date
3539764008 Hackaton: Add more unit tests, take 3 (#101525)
* serviceaccounts/secretscan: test Service more thoroughly

* middleware/cookies: add tests for CookieOptions

* anonymous/anonimpl: cover a couple more methods

* components/imguploader: Implement WebDAV integration tests

* components/apikeygen: also check IsValid method

* bus: cover invalid callback signature cases

* cloudmigration/objectstorage: add basic unit tests

* login/social/connectors: add test case for GitHub OAuth fetch emails+orgs

* expr/classic: cover more evaluator types in tests
2025-03-05 08:00:12 +01:00
aebcecf538 Chore: Fix goimports grouping in other backend platform packages (#62422)
* fix goimports

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order

* fix goimports order
2023-01-30 08:26:42 +00:00
ae9491c3a7 Chore: Make test tracer noop and return no errors (#50797) 2022-06-15 12:40:41 +02:00
0b55c41d05 Chore: Remove global bus variable (#50765)
* Chore: Remove global bus variable

* fix bus in tests
2022-06-14 16:07:41 +02:00
18e93c7077 Chore: Remove bus (#47511)
* Chore: Remove bus

* remove unused const
2022-04-08 16:15:06 +02:00
30aa24a183 Chore: Implement OpenTelemtry in Grafana (#42674)
* Separate Tracer interface to TracerService and Tracer

* Fix lint

* Fix:Make it possible to start spans for both opentracing and opentelemetry in ds proxy

* Add span methods, use span interface for rest of tracing

* Fix logs in tracing

* Fix tests that are related to tracing

* Fix resourcepermissions test

* Fix some tests

* Fix more tests

* Add TracingService to wire cli runner

* Remove GlobalTracer from bus

* Renaming test function

* Remove GlobalTracer from TSDB

* Replace GlobalTracer in api

* Adjust tests to the InitializeForTests func

* Remove GlobalTracer from services

* Remove GlobalTracer

* Remove bus.NewTest

* Remove Tracer interface

* Add InitializeForBus

* Simplify tests

* Clean up tests

* Rename TracerService to Tracer

* Update pkg/middleware/request_tracing.go

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>

* Initialize tracer before passing it to SQLStore initialization in commands

* Remove tests for opentracing

* Set span attributes correctly, remove unnecessary trace initiliazation form test

* Add tracer instance to newSQLStore

* Fix changes due to rebase

* Add modified tracing middleware test

* Fix opentracing implementation tags

Co-authored-by: Marcus Efraimsson <marcus.efraimsson@gmail.com>
2022-01-20 11:10:12 +01:00
65e60759fb Rename AddEventListenerCtx to AddEventListener and PublishCtx to Publish (#43566) 2022-01-04 09:36:01 +01:00
8e6d6af744 Rename DispatchCtx to Dispatch (#43563) 2021-12-28 17:36:22 +01:00
7936c4c522 Rename AddHandlerCtx to AddHandler (#43557) 2021-12-28 16:08:07 +01:00
c80e7764d8 Chore: Remove Dispatch and AddHandler (#42603)
* Remove Dispatch

* Remove context.TODO()

* Remove AddHandler and Dispatch
2021-12-02 18:08:59 +01:00
e6123bc3ef Replace AddHandler with AddHandlerCtx in tests (#42585) 2021-12-01 15:43:31 +01:00
a65e0be110 Replace AddEventListener with AddEventListenerCtx and Publish with PublishCtx (#42284) 2021-11-29 14:23:24 +01:00
972764cf8f Add context for Publish and AddEventListener (#41665)
* Add context for Publish and AddEventListener

* Add test and listenersWithCtx

* Refactor listener logic

* Refactor publish logic for all combination of listeners and publish with and without ctx
2021-11-19 13:56:42 +01:00
337998d58b Chore: Ease the migration of always using context.Context when interacting with the bus (#36733)
If DispatchCtx is called and there's a handler registered using
AddHandler we now allow that and not return a handler not
found error. In addition we log a warning message helping
the developers know that AddHandlerCtx should be used
instead.
If Dispatch is called and there's a handler registered
using AddHandlerCtx we log a warning message helping
the developers know that DispatchCtx should be used instead.
2021-07-15 14:33:38 +02:00
17724e9f84 Bus: Remove unused wildcard handlers and clean up tests (#20327)
* Refactor bus tests

* Remove wildcard listeners

* Fix review comments
2019-11-13 04:02:44 -08:00
08f01a6c4f pkg/bus: Check errors (#19748)
* pkg/bus: Check errors
* pkg/bus: Convert tests to testify
2019-10-14 17:23:31 +02:00
87760d4fde Codestyle: Fix govet issues (#17178)
ref #10381

Signed-off-by: Mario Trangoni <mjtrangoni@gmail.com>
2019-06-04 22:00:05 +02:00
9c1758b593 bus: Dispatch now passes empty ctx if handler require it 2018-06-15 12:46:20 +02:00
629eab0b1e bus: dont mix ctx/classic handlers 2018-06-15 12:46:20 +02:00
e2275701d8 bus: DispatchCtx can now invoke any handler 2018-06-15 12:46:20 +02:00
3752379106 Worked on event system, needs a little more work 2015-02-04 15:37:26 +01:00
68cc3f86dd Handle default datasource management 2015-01-09 16:36:23 +01:00
27f07e9de2 Progress on data source admin 2014-12-16 16:45:07 +01:00
b70a3f0958 started work datasources admin 2014-12-16 12:04:08 +01:00
ff6a2d014a Refactored command/query interface 2014-12-01 08:56:03 -08:00
246f41b88a Bus experiment 2014-11-28 22:16:49 +01:00