K8s/Folders: Use v1beta1 and app-sdk based spec (#103975)

This commit is contained in:
Ryan McKinley
2025-04-14 23:20:10 +03:00
committed by GitHub
parent acfd998fa6
commit 0283c98e30
90 changed files with 1255 additions and 2407 deletions
+4 -4
View File
@@ -307,7 +307,7 @@ func TestService_OrgID(t *testing.T) {
desc: "should set org id from default namespace",
req: &authn.Request{HTTPRequest: &http.Request{
Header: map[string][]string{},
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1/namespaces/default/folders"),
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1beta1/namespaces/default/folders"),
}},
expectedOrgID: 1,
},
@@ -315,7 +315,7 @@ func TestService_OrgID(t *testing.T) {
desc: "should set org id from namespace",
req: &authn.Request{HTTPRequest: &http.Request{
Header: map[string][]string{},
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1/namespaces/org-2/folders"),
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1beta1/namespaces/org-2/folders"),
}},
expectedOrgID: 2,
},
@@ -323,7 +323,7 @@ func TestService_OrgID(t *testing.T) {
desc: "should set set org 1 for stack namespace",
req: &authn.Request{HTTPRequest: &http.Request{
Header: map[string][]string{},
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1/namespaces/stacks-100/folders"),
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1beta1/namespaces/stacks-100/folders"),
}},
stackID: 100,
expectedOrgID: 1,
@@ -332,7 +332,7 @@ func TestService_OrgID(t *testing.T) {
desc: "should error for wrong stack namespace",
req: &authn.Request{HTTPRequest: &http.Request{
Header: map[string][]string{},
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1/namespaces/stacks-100/folders"),
URL: mustParseURL("http://localhost/apis/folder.grafana.app/v1beta1/namespaces/stacks-100/folders"),
}},
stackID: 101,
expectedOrgID: 0,