@@ -192,6 +192,114 @@ func Test_BodyValidation(t *testing.T) {
192
192
// the bicep-types-az parses float as integer type and it should be fixed: https://github.com/Azure/bicep-types-az/issues/1404
193
193
Error : false ,
194
194
},
195
+ {
196
+ Id : "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Consumption/budgets/mybudget" ,
197
+ ApiVersion : "2021-10-01" ,
198
+ Body : `
199
+ {
200
+ "properties": {
201
+ "amount": 10,
202
+ "category": "Cost",
203
+ "notifications": {
204
+ "notification1": {
205
+ "enabled": true,
206
+ "operator": "GreaterThanOrEqualTo",
207
+ "threshold": 50,
208
+ "thresholdType": "Actual",
209
+ "contactEmails": [],
210
+ "contactGroups": []
211
+ }
212
+ },
213
+ "timeGrain": "Annually",
214
+ "timePeriod": {
215
+ "endDate": "foo",
216
+ "startDate": "bar"
217
+ }
218
+ }
219
+ }
220
+ ` ,
221
+ Error : false ,
222
+ },
223
+ {
224
+ Id : "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/myresourcegroup/providers/Microsoft.Consumption/budgets/mybudget" ,
225
+ ApiVersion : "2021-10-01" ,
226
+ Body : `
227
+ {
228
+ "properties": {
229
+ "amount": 10,
230
+ "category": "Cost",
231
+ "notifications": {
232
+ "notification1": {
233
+ "enabled": true,
234
+ "operator": "GreaterThanOrEqualTo",
235
+ "threshold": 50,
236
+ "thresholdType": "Actual",
237
+ "contactEmails": nil,
238
+ "contactGroups": []
239
+ }
240
+ },
241
+ "timeGrain": "Annually",
242
+ "timePeriod": {
243
+ "endDate": "foo",
244
+ "startDate": "bar"
245
+ }
246
+ }
247
+ }
248
+ ` ,
249
+ Error : false ,
250
+ },
251
+ {
252
+ Id : "/subscriptions/00000000-0000-0000-0000-000000000000/providers/Microsoft.Subscription/aliases/alias1" ,
253
+ ApiVersion : "2021-10-01" ,
254
+ Body : `
255
+ {
256
+ "properties": {
257
+ "displayName": "My Subscription",
258
+ "workload": "Production",
259
+ "billingScope": "Shared",
260
+ "additionalProperties": {
261
+ "managementGroupId": nil,
262
+ "tags": {
263
+ "key1": "value1",
264
+ "key2": "value2"
265
+ }
266
+ }
267
+ }
268
+ }` ,
269
+ Error : false ,
270
+ },
271
+ {
272
+ Id : "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/containerApps/containerApp" ,
273
+ ApiVersion : "2022-03-01" ,
274
+ Body : `
275
+ {
276
+ "location": "westus",
277
+ "properties": {
278
+ "configuration": {
279
+ "activeRevisionsMode": "Single"
280
+ },
281
+ "managedEnvironmentId": "/subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/resGroup1/providers/Microsoft.App/managedEnvironments/managedEnv1",
282
+ "template": {
283
+ "containers": [
284
+ {
285
+ "env": [],
286
+ "image": "jackofallops/azure-containerapps-python-acctest:v0.0.1",
287
+ "name": "first",
288
+ "probes": [],
289
+ "resources": {
290
+ "cpu": 0.25,
291
+ "memory": "0.5Gi"
292
+ }
293
+ }
294
+ ],
295
+ "scale": {
296
+ "maxReplicas": 10
297
+ }
298
+ }
299
+ }
300
+ }` ,
301
+ Error : false ,
302
+ },
195
303
}
196
304
197
305
for index , data := range testData {
0 commit comments