@@ -36,20 +36,20 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
3636 name : "OK" ,
3737 input : grafana.DataSource {
3838 Type : "prometheus" ,
39- JSONData : map [string ]interface {} {},
39+ JSONData : map [string ]any {},
4040 },
4141 want : grafana.DataSource {
4242 URL : "https://monitoring.googleapis.com/v1/projects/test/location/global/prometheus/" ,
4343 Type : "prometheus" ,
44- JSONData : map [string ]interface {} {
44+ JSONData : map [string ]any {
4545 "httpHeaderName1" : "Authorization" ,
4646 "httpMethod" : "GET" ,
4747 "prometheusType" : "Prometheus" ,
4848 "prometheusVersion" : "2.40.0" ,
4949 "queryTimeout" : "2m" ,
5050 "timeout" : "120" ,
5151 },
52- SecureJSONData : map [string ]interface {} {
52+ SecureJSONData : map [string ]any {
5353 "httpHeaderValue1" : "Bearer 12345" ,
5454 },
5555 },
@@ -59,15 +59,15 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
5959 input : grafana.DataSource {
6060 URL : "http://localhost:9090" ,
6161 Type : "prometheus" ,
62- JSONData : map [string ]interface {} {
62+ JSONData : map [string ]any {
6363 "httpHeaderName1" : "X-Custom-Header" ,
6464 "httpHeaderName2" : "X-Custom-Header2" ,
6565 },
6666 },
6767 want : grafana.DataSource {
6868 URL : "https://monitoring.googleapis.com/v1/projects/test/location/global/prometheus/" ,
6969 Type : "prometheus" ,
70- JSONData : map [string ]interface {} {
70+ JSONData : map [string ]any {
7171 "httpHeaderName1" : "X-Custom-Header" ,
7272 "httpHeaderName2" : "X-Custom-Header2" ,
7373 "httpHeaderName3" : "Authorization" ,
@@ -77,7 +77,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
7777 "queryTimeout" : "2m" ,
7878 "timeout" : "120" ,
7979 },
80- SecureJSONData : map [string ]interface {} {
80+ SecureJSONData : map [string ]any {
8181 "httpHeaderValue3" : "Bearer 12345" ,
8282 },
8383 },
@@ -87,7 +87,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
8787 input : grafana.DataSource {
8888 URL : "http://localhost:9090" ,
8989 Type : "prometheus" ,
90- JSONData : map [string ]interface {} {
90+ JSONData : map [string ]any {
9191 "httpHeaderName1" : "X-Custom-Header" ,
9292 "httpHeaderName2" : "Authorization" ,
9393 "httpHeaderName3" : "X-Custom-Header3" ,
@@ -99,7 +99,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
9999 want : grafana.DataSource {
100100 URL : "https://monitoring.googleapis.com/v1/projects/test/location/global/prometheus/" ,
101101 Type : "prometheus" ,
102- JSONData : map [string ]interface {} {
102+ JSONData : map [string ]any {
103103 "httpHeaderName1" : "X-Custom-Header" ,
104104 "httpHeaderName2" : "Authorization" ,
105105 "httpHeaderName3" : "X-Custom-Header3" ,
@@ -109,7 +109,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
109109 "queryTimeout" : "2m" ,
110110 "timeout" : "120" ,
111111 },
112- SecureJSONData : map [string ]interface {} {
112+ SecureJSONData : map [string ]any {
113113 "httpHeaderValue2" : "Bearer 12345" ,
114114 },
115115 },
@@ -119,7 +119,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
119119 input : grafana.DataSource {
120120 Type : "prometheus" ,
121121 URL : "http://localhost:9090" ,
122- JSONData : map [string ]interface {} {
122+ JSONData : map [string ]any {
123123 "httpHeaderName1" : "X-Custom-Header" ,
124124 "httpHeaderName2" : "X-Custom-Header2" ,
125125 "httpHeaderName3" : "Authorization" ,
@@ -131,7 +131,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
131131 want : grafana.DataSource {
132132 URL : "https://monitoring.googleapis.com/v1/projects/test/location/global/prometheus/" ,
133133 Type : "prometheus" ,
134- JSONData : map [string ]interface {} {
134+ JSONData : map [string ]any {
135135 "httpHeaderName1" : "X-Custom-Header" ,
136136 "httpHeaderName2" : "X-Custom-Header2" ,
137137 "httpHeaderName3" : "Authorization" ,
@@ -141,7 +141,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
141141 "queryTimeout" : "2m" ,
142142 "timeout" : "120" ,
143143 },
144- SecureJSONData : map [string ]interface {} {
144+ SecureJSONData : map [string ]any {
145145 "httpHeaderValue3" : "Bearer 12345" ,
146146 },
147147 },
@@ -151,7 +151,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
151151 input : grafana.DataSource {
152152 Type : "prometheus" ,
153153 URL : "http://localhost:9090" ,
154- JSONData : map [string ]interface {} {
154+ JSONData : map [string ]any {
155155 "prometheusType" : "Prometheus" ,
156156 "prometheusVersion" : "2.42.0" ,
157157 "queryTimeout" : "3m" ,
@@ -161,15 +161,15 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
161161 want : grafana.DataSource {
162162 URL : "https://monitoring.googleapis.com/v1/projects/test/location/global/prometheus/" ,
163163 Type : "prometheus" ,
164- JSONData : map [string ]interface {} {
164+ JSONData : map [string ]any {
165165 "httpHeaderName1" : "Authorization" ,
166166 "httpMethod" : "GET" ,
167167 "prometheusType" : "Prometheus" ,
168168 "prometheusVersion" : "2.42.0" ,
169169 "queryTimeout" : "3m" ,
170170 "timeout" : "160" ,
171171 },
172- SecureJSONData : map [string ]interface {} {
172+ SecureJSONData : map [string ]any {
173173 "httpHeaderValue1" : "Bearer 12345" ,
174174 },
175175 },
@@ -188,7 +188,7 @@ func TestBuildUpdateDataSourceRequest(t *testing.T) {
188188 got , err := buildUpdateDataSourceRequest (tt .input , accessToken )
189189 if tt .fail {
190190 if err == nil {
191- t .Fatalf ("unexpectedly succeeded" )
191+ t .Fatal ("unexpectedly succeeded" )
192192 }
193193 return
194194 }
0 commit comments