package model import ( "os" "strings" "testing" ) func TestDocumentedConsumerModelTypes(t *testing.T) { raw, err := os.ReadFile("../docs/consumers/pkg-model.md") if err != nil { t.Fatalf("ReadFile(pkg-model.md) error = %v", err) } doc := string(raw) required := []string{ "gitea.maximumdirect.net/ejr/weatherfeeder/model", "WeatherObservation", "WeatherForecastRun", "WeatherForecastPeriod", "WeatherForecastDiscussion", "WeatherForecastDiscussionSection", "WeatherStoryRun", "WeatherStory", "WeatherAlertRun", "WeatherAlert", "WeatherAlertReference", "WeatherOutlookRun", "WeatherOutlookDiscussion", "WeatherOutlook", "WMOCode", } for _, want := range required { if !strings.Contains(doc, want) { t.Fatalf("docs/consumers/pkg-model.md missing %q", want) } } }