diff options
| author | Taras Madan <tarasmadan@google.com> | 2025-05-02 15:38:41 +0200 |
|---|---|---|
| committer | Taras Madan <tarasmadan@google.com> | 2025-05-05 07:52:10 +0000 |
| commit | 6ca47dd8c9143c396aeae9f5bb3cafda25c78848 (patch) | |
| tree | 3a02c19a37578c034f4045faf14812ab720859de /dashboard/app/reporting_email.go | |
| parent | b0714e3765d142fe4804381880268a54cb4b984c (diff) | |
dashboard/app: allow to set spanner context only from tests
getSpannerClient returns prod client as a default.
Diffstat (limited to 'dashboard/app/reporting_email.go')
| -rw-r--r-- | dashboard/app/reporting_email.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/dashboard/app/reporting_email.go b/dashboard/app/reporting_email.go index a141caba5..f15de3287 100644 --- a/dashboard/app/reporting_email.go +++ b/dashboard/app/reporting_email.go @@ -110,9 +110,6 @@ func (cfg *EmailConfig) Validate() error { // Assuming it is called June 15, the monthly report will cover April-May diff. func handleCoverageReports(w http.ResponseWriter, r *http.Request) { ctx := r.Context() - if coverageDBClient != nil { // initialized in prod deployment, nil in tests - ctx = SetCoverageDBClient(r.Context(), coverageDBClient) - } targetDate := civil.DateOf(timeNow(ctx)).AddMonths(-1) periods, err := coveragedb.GenNPeriodsTill(2, targetDate, "month") if err != nil { @@ -196,7 +193,7 @@ func sendNsCoverageReport(ctx context.Context, ns, email string, func coverageTable(ctx context.Context, ns string, fromTo []coveragedb.TimePeriod, minDrop int) (string, error) { covAndDates, err := coveragedb.FilesCoverageWithDetails( ctx, - GetCoverageDBClient(ctx), + getCoverageDBClient(ctx), &coveragedb.SelectScope{ Ns: ns, Periods: fromTo, |
