Document current outlook schema behavior
This commit is contained in:
33
internal/sinks/postgres/docs_test.go
Normal file
33
internal/sinks/postgres/docs_test.go
Normal file
@@ -0,0 +1,33 @@
|
||||
package postgres
|
||||
|
||||
import (
|
||||
"os"
|
||||
"strings"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestDocumentedOutlookDiscussionStorage(t *testing.T) {
|
||||
for _, path := range []string{
|
||||
"../../../docs/integrations/postgres.md",
|
||||
"../../../docs/internal/postgres-sink.md",
|
||||
} {
|
||||
t.Run(path, func(t *testing.T) {
|
||||
raw, err := os.ReadFile(path)
|
||||
if err != nil {
|
||||
t.Fatalf("ReadFile(%s) error = %v", path, err)
|
||||
}
|
||||
doc := string(raw)
|
||||
|
||||
for _, want := range []string{
|
||||
tableOutlookDiscussions,
|
||||
"discussion_count",
|
||||
"discussion_index",
|
||||
"weather.outlook.v2",
|
||||
} {
|
||||
if !strings.Contains(doc, want) {
|
||||
t.Fatalf("%s missing %q", path, want)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user