Verify versioned contracts and exact offline distribution selection
This commit is contained in:
@@ -16,7 +16,7 @@ func TestDistributionDocuments(t *testing.T) {
|
||||
root := os.DirFS("../..")
|
||||
for _, required := range []string{
|
||||
"README.md", "AGENTS.md", "LICENSE", "COPYRIGHT", "VERSION", "go.mod", "go.sum",
|
||||
"docs/party.md", "docs/campaign.md", "docs/glossary.md", "docs/validation.md",
|
||||
"catalog.json", "docs/catalog.md", "docs/validation.md",
|
||||
"docs/compatibility.md", "docs/development.md", "docs/release.md", "docs/inventory.md",
|
||||
"docs/oss/attribution.md", "scripts/check.sh", ".woodpecker.yml",
|
||||
} {
|
||||
@@ -24,6 +24,16 @@ func TestDistributionDocuments(t *testing.T) {
|
||||
t.Errorf("required distribution content %s: %v", required, err)
|
||||
}
|
||||
}
|
||||
set := loadSet(t)
|
||||
for _, record := range set.Catalog.Schemas {
|
||||
if _, err := fs.Stat(root, path.Join(path.Dir(record.Path), "semantics.md")); err != nil {
|
||||
t.Error(err)
|
||||
}
|
||||
entries, err := fs.ReadDir(root, path.Join(path.Dir(record.Path), "examples"))
|
||||
if err != nil || len(entries) == 0 {
|
||||
t.Errorf("%s missing examples: %v", record.Path, err)
|
||||
}
|
||||
}
|
||||
version, err := fs.ReadFile(root, "VERSION")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
Reference in New Issue
Block a user