mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Add AwaitHealthy to ModuleEngine and Server (#72215)
* Chore: Add AwaitHealthy to ModuleEngine and Server * switch from fmt.Errorf to errors.New Co-authored-by: Will Browne <wbrowne@users.noreply.github.com> --------- Co-authored-by: Will Browne <wbrowne@users.noreply.github.com>
This commit is contained in:
@@ -71,6 +71,8 @@ func StartGrafanaEnv(t *testing.T, grafDir, cfgPath string) (string, *server.Tes
|
||||
})
|
||||
|
||||
// Wait for Grafana to be ready
|
||||
err = env.Server.AwaitHealthy(ctx)
|
||||
require.NoError(t, err)
|
||||
addr := listener.Addr().String()
|
||||
resp, err := http.Get(fmt.Sprintf("http://%s/api/health", addr))
|
||||
require.NoError(t, err)
|
||||
|
Reference in New Issue
Block a user