grafana/grafana-build

Add commands for running unit, integration, and e2e tests.

kminehart opened this issue · 1 comments

I'm thinking it should look something like this:

go run ./cmd backend test [--unit={boolean:true}] [--integration={boolean:false}] [--database={[sqlite|mysql|postgres]:sqlite}]
go run ./cmd e2e [--server={string:localhost:3001}]

These commands will basically replace our PR testing pipelines.

Our goal is to start packaging and distributed tested Grafana packages, so we need a way to test them first.

We should use Dagger's services feature: https://dagger.io/blog/dagger-engine-0-4-0

I am not sure that there's much value in actually running tests using Dagger. The goal of using Dagger is to get fast feedback using Docker, but developers can already run these tests locally and get fast feedback without Dagger, so I don't see any reason to introduce it at the moment.

E2E tests might be a different story though.