Remove recent changes from prompt execution
This commit is contained in:
@@ -34,9 +34,6 @@ func TestBuildDailyDataPackage(t *testing.T) {
|
||||
if got := pkg.Briefing.Values["current_conditions"].(map[string]string)["condition_text"]; got != "Partly cloudy" {
|
||||
t.Fatalf("current_conditions.condition_text = %q, want Partly cloudy", got)
|
||||
}
|
||||
if pkg.RecentChanges.Items == nil || len(pkg.RecentChanges.Items) != 0 {
|
||||
t.Fatalf("RecentChanges.Items = %#v, want empty slice", pkg.RecentChanges.Items)
|
||||
}
|
||||
}
|
||||
|
||||
func TestBuildCurrentLocalDateUsesReportTimezone(t *testing.T) {
|
||||
@@ -181,7 +178,7 @@ func TestMarshalYAMLIsDeterministicAndGroupsNamedStanzas(t *testing.T) {
|
||||
if string(first) != string(second) {
|
||||
t.Fatalf("YAML output changed between marshals:\n%s\n---\n%s", string(first), string(second))
|
||||
}
|
||||
if !strings.Contains(string(first), "schema_version: weatherreporter.data_package.v3") ||
|
||||
if !strings.Contains(string(first), "schema_version: weatherreporter.data_package.v4") ||
|
||||
!strings.Contains(string(first), "briefing:\n") ||
|
||||
!strings.Contains(string(first), " applicable_risk_products:\n") ||
|
||||
!strings.Contains(string(first), " derived_summaries:\n") ||
|
||||
@@ -191,6 +188,9 @@ func TestMarshalYAMLIsDeterministicAndGroupsNamedStanzas(t *testing.T) {
|
||||
!strings.Contains(string(first), " condition_text: Partly cloudy") {
|
||||
t.Fatalf("YAML output missing expected grouped stanzas:\n%s", string(first))
|
||||
}
|
||||
if strings.Contains(string(first), "recent_changes") {
|
||||
t.Fatalf("YAML output contains removed recent_changes stanza:\n%s", string(first))
|
||||
}
|
||||
for _, pair := range []struct {
|
||||
before string
|
||||
after string
|
||||
@@ -289,7 +289,7 @@ func TestMarshalYAMLRejectsUncategorizedStanza(t *testing.T) {
|
||||
|
||||
func TestLoadYAMLRejectsMisplacedStanza(t *testing.T) {
|
||||
data := []byte(`
|
||||
schema_version: weatherreporter.data_package.v3
|
||||
schema_version: weatherreporter.data_package.v4
|
||||
run_id: 20260529T100000Z_daily
|
||||
report:
|
||||
id: daily
|
||||
@@ -306,8 +306,6 @@ briefing:
|
||||
raw_data:
|
||||
alert_digest:
|
||||
checked: true
|
||||
recent_changes:
|
||||
items: []
|
||||
`)
|
||||
|
||||
_, err := LoadYAML(data)
|
||||
@@ -325,10 +323,10 @@ func TestLoadYAMLRejectsOldSchemaVersion(t *testing.T) {
|
||||
if err != nil {
|
||||
t.Fatalf("MarshalYAML() error = %v", err)
|
||||
}
|
||||
data = []byte(strings.Replace(string(data), "weatherreporter.data_package.v3", "weatherreporter.data_package.v2", 1))
|
||||
data = []byte(strings.Replace(string(data), "weatherreporter.data_package.v4", "weatherreporter.data_package.v3", 1))
|
||||
|
||||
_, err = LoadYAML(data)
|
||||
if err == nil || !strings.Contains(err.Error(), "schemaVersion must be weatherreporter.data_package.v3") {
|
||||
if err == nil || !strings.Contains(err.Error(), "schemaVersion must be weatherreporter.data_package.v4") {
|
||||
t.Fatalf("LoadYAML() error = %v, want current schema version error", err)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user