Provisioning: Abstract away how we build discovery and dynamic clients (#110662)

Abstract away how we get discovery and dynamic clients
This commit is contained in:
Roberto Jiménez Sánchez
2025-09-05 09:22:30 +00:00
committed by GitHub
parent 6a54340501
commit 1b9e479b68
19 changed files with 216 additions and 159 deletions
+3 -3
View File
@@ -24,7 +24,7 @@ func TestIntegrationProvisioning_Client(t *testing.T) {
require.NoError(t, err)
t.Run("dashboard client support", func(t *testing.T) {
_, _, err := clients.ForResource(schema.GroupVersionResource{
_, _, err := clients.ForResource(ctx, schema.GroupVersionResource{
Group: dashboardV1.GROUP,
Version: dashboardV1.VERSION,
Resource: "dashboards",
@@ -32,7 +32,7 @@ func TestIntegrationProvisioning_Client(t *testing.T) {
require.NoError(t, err)
// With empty version, we should get the preferred version (v1beta1)
_, gvk, err := clients.ForResource(schema.GroupVersionResource{
_, gvk, err := clients.ForResource(ctx, schema.GroupVersionResource{
Group: dashboardV1.GROUP,
Resource: "dashboards",
})
@@ -40,7 +40,7 @@ func TestIntegrationProvisioning_Client(t *testing.T) {
require.Equal(t, dashboardV1.VERSION, gvk.Version)
require.Equal(t, "Dashboard", gvk.Kind)
_, _, err = clients.ForKind(schema.GroupVersionKind{
_, _, err = clients.ForKind(ctx, schema.GroupVersionKind{
Group: dashboardV1.GROUP,
Version: dashboardV1.VERSION,
Kind: "Dashboard",