All checks were successful
ci/woodpecker/push/build-image Pipeline was successful
38 lines
784 B
Go
38 lines
784 B
Go
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",
|
|
"WeatherOutlook",
|
|
"WMOCode",
|
|
}
|
|
for _, want := range required {
|
|
if !strings.Contains(doc, want) {
|
|
t.Fatalf("docs/consumers/pkg-model.md missing %q", want)
|
|
}
|
|
}
|
|
}
|