Plugins: Add app (#108422)

This commit is contained in:
Todd Treece
2025-08-06 13:09:10 -04:00
committed by GitHub
parent 1f76765ed7
commit ce2697bb07
37 changed files with 2923 additions and 11 deletions
+90
View File
@@ -0,0 +1,90 @@
package plugins
import (
"testing"
"github.com/stretchr/testify/require"
)
func TestPluginsIntegrationDiscovery(t *testing.T) {
if testing.Short() {
t.Skip("skipping integration test")
}
t.Run("discovery", func(t *testing.T) {
helper := setupHelper(t)
disco := helper.GetGroupVersionInfoJSON("plugins.grafana.app")
require.JSONEq(t, `[
{
"version": "v0alpha1",
"freshness": "Current",
"resources": [
{
"resource": "plugininstalls",
"responseKind": {
"group": "",
"kind": "PluginInstall",
"version": ""
},
"scope": "Namespaced",
"singularResource": "plugininstalls",
"subresources": [
{
"responseKind": {
"group": "",
"kind": "PluginInstall",
"version": ""
},
"subresource": "status",
"verbs": [
"get",
"patch",
"update"
]
}
],
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
},
{
"resource": "pluginmetas",
"responseKind": {
"group": "",
"kind": "PluginMeta",
"version": ""
},
"scope": "Namespaced",
"singularResource": "pluginmeta",
"subresources": [
{
"responseKind": {
"group": "",
"kind": "PluginMeta",
"version": ""
},
"subresource": "status",
"verbs": [
"get",
"patch",
"update"
]
}
],
"verbs": [
"get",
"list"
]
}
]
}
]`, disco)
})
}