API: enable proxying datasource calls using the datasource UID (#47634)
* Introduce additional routes
This commit is contained in:
committed by
GitHub
parent
7916f3b638
commit
c8189e4808
@@ -24,6 +24,18 @@ func TestDataProxy(t *testing.T) {
|
||||
"/api/datasources/proxy/54/api/services/afsd%2Fafsd/operations",
|
||||
"api/services/afsd%2Fafsd/operations",
|
||||
},
|
||||
{
|
||||
"/api/datasources/proxy/uid/26MI0wZ7k",
|
||||
"",
|
||||
},
|
||||
{
|
||||
"/api/datasources/proxy/uid/26MI0wZ7k/some/thing",
|
||||
"some/thing",
|
||||
},
|
||||
{
|
||||
"/api/datasources/proxy/uid/26MI0wZ7k/api/services/afsd%2Fafsd/operations",
|
||||
"api/services/afsd%2Fafsd/operations",
|
||||
},
|
||||
}
|
||||
for _, tc := range testCases {
|
||||
t.Run("Given raw path, should extract expected proxy path", func(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user