K8s/Dashboard: Promote from alpha1 to beta1 (#104009)
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"github.com/stretchr/testify/require"
|
||||
"k8s.io/apimachinery/pkg/runtime/schema"
|
||||
|
||||
dashboardV1 "github.com/grafana/grafana/apps/dashboard/pkg/apis/dashboard/v1beta1"
|
||||
"github.com/grafana/grafana/pkg/registry/apis/provisioning/resources"
|
||||
)
|
||||
|
||||
@@ -24,22 +25,24 @@ func TestIntegrationProvisioning_Client(t *testing.T) {
|
||||
|
||||
t.Run("dashboard client support", func(t *testing.T) {
|
||||
_, _, err := clients.ForResource(schema.GroupVersionResource{
|
||||
Group: "dashboard.grafana.app",
|
||||
Group: dashboardV1.GROUP,
|
||||
Version: dashboardV1.VERSION,
|
||||
Resource: "dashboards",
|
||||
Version: "v1alpha1",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
// With empty version, we should get the preferred version (v1alpha1)
|
||||
_, _, err = clients.ForResource(schema.GroupVersionResource{
|
||||
Group: "dashboard.grafana.app",
|
||||
// With empty version, we should get the preferred version (v1beta1)
|
||||
_, gvk, err := clients.ForResource(schema.GroupVersionResource{
|
||||
Group: dashboardV1.GROUP,
|
||||
Resource: "dashboards",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, dashboardV1.VERSION, gvk.Version)
|
||||
require.Equal(t, "Dashboard", gvk.Kind)
|
||||
|
||||
_, _, err = clients.ForKind(schema.GroupVersionKind{
|
||||
Group: "dashboard.grafana.app",
|
||||
Version: "v1alpha1",
|
||||
Group: dashboardV1.GROUP,
|
||||
Version: dashboardV1.VERSION,
|
||||
Kind: "Dashboard",
|
||||
})
|
||||
require.NoError(t, err)
|
||||
|
||||
Reference in New Issue
Block a user