K8s/Dashboards: Implement dashboards as StorageBackend (#90295)

This commit is contained in:
Ryan McKinley
2024-07-17 10:49:23 -07:00
committed by GitHub
parent 9459e29775
commit f409f8c169
20 changed files with 1757 additions and 629 deletions
+52 -51
View File
@@ -47,58 +47,59 @@ func TestIntegrationDashboardsApp(t *testing.T) {
t.Run("Check discovery client", func(t *testing.T) {
disco := helper.GetGroupVersionInfoJSON("dashboard.grafana.app")
//fmt.Printf("%s", string(disco))
// fmt.Printf("%s", string(disco))
require.JSONEq(t, `[
{
"freshness": "Current",
"resources": [
{
"resource": "dashboards",
"responseKind": {
"group": "",
"kind": "Dashboard",
"version": ""
},
"scope": "Namespaced",
"singularResource": "dashboard",
"subresources": [
{
"responseKind": {
"group": "",
"kind": "DashboardWithAccessInfo",
"version": ""
},
"subresource": "dto",
"verbs": [
"get"
]
},
{
"responseKind": {
"group": "",
"kind": "DashboardVersionList",
"version": ""
},
"subresource": "versions",
"verbs": [
"get"
]
}
],
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update"
]
}
],
"version": "v0alpha1"
}
]`, disco)
{
"freshness": "Current",
"resources": [
{
"resource": "dashboards",
"responseKind": {
"group": "",
"kind": "Dashboard",
"version": ""
},
"scope": "Namespaced",
"singularResource": "dashboard",
"subresources": [
{
"responseKind": {
"group": "",
"kind": "DashboardWithAccessInfo",
"version": ""
},
"subresource": "dto",
"verbs": [
"get"
]
},
{
"responseKind": {
"group": "",
"kind": "PartialObjectMetadataList",
"version": ""
},
"subresource": "history",
"verbs": [
"get"
]
}
],
"verbs": [
"create",
"delete",
"deletecollection",
"get",
"list",
"patch",
"update",
"watch"
]
}
],
"version": "v0alpha1"
}
]`, disco)
})
}