Team LBAC: Limit access to data source (#78376)

* Team LBAC: Limit access to data source

* Fix tests
This commit is contained in:
Alexander Zobnin
2023-12-05 12:45:40 +01:00
committed by GitHub
parent d099292d99
commit 043096d652
4 changed files with 76 additions and 56 deletions

View File

@@ -63,14 +63,16 @@ func TestTeamHTTPHeaders(t *testing.T) {
testCases := []struct {
desc string
given string
want TeamHTTPHeaders
want *TeamHTTPHeaders
}{
{
desc: "Usual json data with teamHttpHeaders",
given: `{"teamHttpHeaders": {"101": [{"header": "X-CUSTOM-HEADER", "value": "foo"}]}}`,
want: TeamHTTPHeaders{
"101": {
{Header: "X-CUSTOM-HEADER", Value: "foo"},
given: `{"teamHttpHeaders": {"headers": {"101": [{"header": "X-CUSTOM-HEADER", "value": "foo"}]}}}`,
want: &TeamHTTPHeaders{
Headers: TeamHeaders{
"101": {
{Header: "X-CUSTOM-HEADER", Value: "foo"},
},
},
},
},