Replace legacy daily report with generated text daily report
This commit is contained in:
@@ -163,7 +163,7 @@ reports:
|
||||
if err != nil {
|
||||
t.Fatalf("ReportModuleOverrides() error = %v", err)
|
||||
}
|
||||
items := overrides[report.DailyToday]
|
||||
items := overrides[report.Daily]
|
||||
if len(items) != 6 {
|
||||
t.Fatalf("daily override length = %d, want 6", len(items))
|
||||
}
|
||||
@@ -220,8 +220,8 @@ reports:
|
||||
t.Fatalf("today override[%d] = %s, want %s", i, items[i].ID, id)
|
||||
}
|
||||
}
|
||||
if _, ok := overrides[report.DailyToday]; ok {
|
||||
t.Fatalf("daily override = %#v, want today override to stay distinct", overrides[report.DailyToday])
|
||||
if _, ok := overrides[report.Daily]; ok {
|
||||
t.Fatalf("daily override = %#v, want today override to stay distinct", overrides[report.Daily])
|
||||
}
|
||||
}
|
||||
|
||||
@@ -320,12 +320,12 @@ func TestValidateReportModuleAliasesDirectly(t *testing.T) {
|
||||
wantErr string
|
||||
}{
|
||||
{
|
||||
name: "DuplicateAlias",
|
||||
name: "RetiredDailyReportID",
|
||||
reports: map[string]ReportConfig{
|
||||
"daily": {},
|
||||
"daily_today": {},
|
||||
},
|
||||
wantErr: "duplicates report override",
|
||||
wantErr: "reports.daily_today",
|
||||
},
|
||||
{
|
||||
name: "TodayAndDailyAreDistinct",
|
||||
@@ -425,7 +425,7 @@ reports:
|
||||
deterministic_modules:
|
||||
- tomorrow_planning
|
||||
`,
|
||||
wantErr: `not compatible with report "daily_today"`,
|
||||
wantErr: `not compatible with report "daily"`,
|
||||
},
|
||||
{
|
||||
name: "RemovedPlaceholderModule",
|
||||
@@ -461,7 +461,7 @@ reports:
|
||||
wantErr: "options are invalid",
|
||||
},
|
||||
{
|
||||
name: "DuplicateReportAlias",
|
||||
name: "RetiredDailyReportID",
|
||||
yaml: `
|
||||
reports:
|
||||
daily:
|
||||
@@ -471,7 +471,7 @@ reports:
|
||||
deterministic_modules:
|
||||
- current_conditions
|
||||
`,
|
||||
wantErr: "duplicates report override",
|
||||
wantErr: "reports.daily_today",
|
||||
},
|
||||
{
|
||||
name: "HourlyIncompatibleDailyModule",
|
||||
|
||||
Reference in New Issue
Block a user