Skip to content
This repository has been archived by the owner on Jan 21, 2025. It is now read-only.

Commit

Permalink
Reopen Tests ARM, test case for listing available operations.
Browse files Browse the repository at this point in the history
  • Loading branch information
v-hongli1 committed Nov 4, 2024
1 parent 2d78f20 commit a8d3334
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 31 deletions.
46 changes: 23 additions & 23 deletions packages/cadl-ranch-specs/cadl-ranch-summary.md
Original file line number Diff line number Diff line change
Expand Up @@ -907,33 +907,33 @@ Expected response body:
}
```

### Azure_ResourceManager_OperationTemplates_AvailableOperations_list
### Azure_ResourceManager_OperationTemplates_ListAvailableOperations

- Endpoint: `get https://management.azure.com`

Resource GET operation.
Expected path: /providers/Azure.ResourceManager.OperationTemplates/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
Resource GET operation.
Expected path: /providers/Azure.ResourceManager.Models.Resources/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:

```json
{
"value": [
{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}
]
}
```
```json
{
"value": [
{
"name": "Microsoft.Compute/virtualMachines/write",
"isDataAction": false,
"display": {
"provider": "Microsoft Compute",
"resource": "Virtual Machines",
"operation": "Create or Update Virtual Machine.",
"description": "Add or modify virtual machines."
},
"origin": "user,system",
"actionType": "Internal"
}
]
}
```

### Azure_ResourceManager_Resources_Nested_createOrReplace

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@ using TypeSpec.OpenAPI;

namespace Azure.ResourceManager.OperationTemplates;

interface AvailableOperations {
@scenario
@scenarioDoc("""
@scenario("ListAvailableOperations")
@scenarioDoc("""
Resource GET operation.
Expected path: /providers/Azure.ResourceManager.OperationTemplates/operations
Expected path: /providers/Azure.ResourceManager.Models.Resources/operations
Expected query parameter: api-version=2023-12-01-preview
Expected response body:
```json
Expand All @@ -34,6 +33,5 @@ interface AvailableOperations {
}]
}
```
""")
list is Azure.ResourceManager.Operations.list;
}
""")
interface Operations extends Azure.ResourceManager.Operations {}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const validAvailableOperations = {
};

// operation list
Scenarios.Azure_ResourceManager_OperationTemplates_AvailableOperations_list = passOnSuccess({
Scenarios.Azure_ResourceManager_OperationTemplates_ListAvailableOperations = passOnSuccess({
uri: "/providers/Azure.ResourceManager.OperationTemplates/operations",
method: "get",
request: {
Expand Down

0 comments on commit a8d3334

Please sign in to comment.