Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions internal/plugins/alltest/plugins_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,3 +67,31 @@ func TestAllPluginsInInfoCSV(t *testing.T) {
check(name, plugins.TypeTracer)
})
}

// TestPluginCloudEnablement requires each plugin to either be enabled in the
// cloud distribution or to document why it is not, via the
// cloud_unsupported_reason column in internal/plugins/info.csv.
func TestPluginCloudEnablement(t *testing.T) {
for key, info := range plugins.BaseInfo {
if info.Cloud {
if info.CloudUnsupportedReason != "" {
t.Errorf("plugin %q is cloud-enabled but has cloud_unsupported_reason %q set; clear that column", key, info.CloudUnsupportedReason)
}
continue
}
if info.CloudUnsupportedReason == "" {
t.Errorf("plugin %q is not cloud-enabled and is missing a cloud_unsupported_reason in internal/plugins/info.csv; either enable it for cloud or document why it cannot be", key)
}
}
}

// TestPluginVersion requires every plugin entry in internal/plugins/info.csv to
// be tagged with the release in which it first shipped. New plugins must set
// version to the upcoming release rather than leaving the placeholder 0.0.0.
func TestPluginVersion(t *testing.T) {
for key, info := range plugins.BaseInfo {
if info.Version == "" || info.Version == "0.0.0" {
t.Errorf("plugin %q has placeholder version %q in internal/plugins/info.csv; set it to the release tag the plugin first shipped in", key, info.Version)
}
}
}
Loading