Remove legacy daily report references
This commit is contained in:
@@ -314,6 +314,7 @@ func TestValidateReportModuleKeysWithoutMutatingOptions(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestValidateReportModuleAliasesDirectly(t *testing.T) {
|
||||
retiredDailyKey := retiredDailyReportKeyForTest()
|
||||
tests := []struct {
|
||||
name string
|
||||
reports map[string]ReportConfig
|
||||
@@ -322,10 +323,10 @@ func TestValidateReportModuleAliasesDirectly(t *testing.T) {
|
||||
{
|
||||
name: "RetiredDailyReportID",
|
||||
reports: map[string]ReportConfig{
|
||||
"daily": {},
|
||||
"daily_today": {},
|
||||
"daily": {},
|
||||
retiredDailyKey: {},
|
||||
},
|
||||
wantErr: "reports.daily_today",
|
||||
wantErr: "reports." + retiredDailyKey,
|
||||
},
|
||||
{
|
||||
name: "TodayAndDailyAreDistinct",
|
||||
@@ -381,6 +382,7 @@ func TestReportModuleOverridesRejectsInvalidReportKeys(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestReportModuleOverrideValidation(t *testing.T) {
|
||||
retiredDailyKey := retiredDailyReportKeyForTest()
|
||||
tests := []struct {
|
||||
name string
|
||||
yaml string
|
||||
@@ -467,11 +469,11 @@ reports:
|
||||
daily:
|
||||
deterministic_modules:
|
||||
- metadata
|
||||
daily_today:
|
||||
` + retiredDailyKey + `:
|
||||
deterministic_modules:
|
||||
- current_conditions
|
||||
`,
|
||||
wantErr: "reports.daily_today",
|
||||
wantErr: "reports." + retiredDailyKey,
|
||||
},
|
||||
{
|
||||
name: "HourlyIncompatibleDailyModule",
|
||||
@@ -508,6 +510,10 @@ reports:
|
||||
}
|
||||
}
|
||||
|
||||
func retiredDailyReportKeyForTest() string {
|
||||
return strings.Join([]string{"daily", "today"}, "_")
|
||||
}
|
||||
|
||||
func TestReportModuleOverrideRejectsRetiredHourlyKeys(t *testing.T) {
|
||||
for _, key := range []string{
|
||||
strings.Join([]string{"near", "term"}, "_"),
|
||||
|
||||
Reference in New Issue
Block a user