Skip to content

Commit

Permalink
tps tests - add test cases by leveraging some green field typespec fi…
Browse files Browse the repository at this point in the history
…les (#1414)
  • Loading branch information
dolauli authored Dec 11, 2024
1 parent 3904ad3 commit 74242d7
Show file tree
Hide file tree
Showing 6,038 changed files with 1,184,069 additions and 3 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import "./main.tsp";
import "@azure-tools/typespec-client-generator-core";

using Azure.ClientGenerator.Core;

@@clientName(Microsoft.AppComplianceAutomation,
"AppComplianceAutomationMgmt",
"python"
);
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"parameters": {
"api-version": "2024-06-27",
"evidenceName": "evidence1",
"parameters": {
"properties": {
"controlId": "Operational_Security_10",
"evidenceType": "File",
"filePath": "/test-byos/evidence1.png",
"responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services"
}
},
"reportName": "testReportName"
},
"responses": {
"200": {
"body": {
"name": "evidence1",
"type": "Microsfot.AppComplianceAutomation/reports/evidences",
"id": "/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1",
"properties": {
"controlId": "Operational_Security_10",
"evidenceType": "File",
"extraData": "sampleData",
"filePath": "/acat-container/evidence1.png",
"provisioningState": "Succeeded",
"responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services"
},
"systemData": {
"createdAt": "2021-05-14T22:34:55.4499903Z",
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdByType": "User",
"lastModifiedAt": "2021-05-14T22:34:55.4499903Z",
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
"lastModifiedByType": "User"
}
}
},
"201": {
"body": {
"name": "evidence1",
"type": "Microsfot.AppComplianceAutomation/reports/evidences",
"id": "/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1",
"properties": {
"controlId": "Operational_Security_10",
"evidenceType": "File",
"extraData": "sampleData",
"filePath": "/acat-container/evidence1.png",
"provisioningState": "Succeeded",
"responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services"
},
"systemData": {
"createdAt": "2021-05-14T22:34:55.4499903Z",
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdByType": "User",
"lastModifiedAt": "2021-05-14T22:34:55.4499903Z",
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
"lastModifiedByType": "User"
}
}
}
},
"operationId": "Evidence_CreateOrUpdate",
"title": "Evidence_CreateOrUpdate"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"parameters": {
"api-version": "2024-06-27",
"evidenceName": "evidence1",
"reportName": "testReportName"
},
"responses": {
"200": {},
"204": {}
},
"operationId": "Evidence_Delete",
"title": "Evidence_Delete"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{
"parameters": {
"api-version": "2024-06-27",
"evidenceName": "evidence1",
"parameters": {
"offerGuid": "00000000-0000-0000-0000-000000000000",
"reportCreatorTenantId": "00000000-0000-0000-0000-000000000000"
},
"reportName": "testReportName"
},
"responses": {
"200": {
"body": {
"evidenceFile": {
"url": "this is a url"
}
}
}
},
"operationId": "Evidence_Download",
"title": "Evidence_Download"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
{
"parameters": {
"api-version": "2024-06-27",
"evidenceName": "evidence1",
"reportName": "testReportName"
},
"responses": {
"200": {
"body": {
"name": "evidence1",
"type": "Microsfot.AppComplianceAutomation/reports/evidences",
"id": "/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1",
"properties": {
"controlId": "Operational_Security_10",
"evidenceType": "File",
"extraData": "sampleData",
"filePath": "/acat-container/evidence1.png",
"provisioningState": "Succeeded",
"responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services"
},
"systemData": {
"createdAt": "2021-05-14T22:34:55.4499903Z",
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdByType": "User",
"lastModifiedAt": "2021-05-14T22:34:55.4499903Z",
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
"lastModifiedByType": "User"
}
}
}
},
"operationId": "Evidence_Get",
"title": "Evidence_Get"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"parameters": {
"api-version": "2024-06-27",
"reportName": "reportName"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "evidence1",
"type": "Microsfot.AppComplianceAutomation/reports/evidences",
"id": "/provider/Microsfot.AppComplianceAutomation/reports/testReportName/evidences/evidence1",
"properties": {
"controlId": "Operational_Security_10",
"evidenceType": "File",
"extraData": "sampleData",
"filePath": "/acat-container/evidence1.png",
"provisioningState": "Succeeded",
"responsibilityId": "authorized_ip_ranges_should_be_defined_on_kubernetes_services"
},
"systemData": {
"createdAt": "2021-05-14T22:34:55.4499903Z",
"createdBy": "00000000-0000-0000-0000-000000000000",
"createdByType": "User",
"lastModifiedAt": "2021-05-14T22:34:55.4499903Z",
"lastModifiedBy": "00000000-0000-0000-0000-000000000000",
"lastModifiedByType": "User"
}
}
]
}
}
},
"operationId": "Evidence_ListByReport",
"title": "Evidence_ListByReport"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"operationId": "ProviderActions_ListInUseStorageAccounts",
"title": "ListInUseStorageAccountsWithSubscriptions",
"parameters": {
"api-version": "2024-06-27",
"parameters": {
"subscriptionIds": [
"0000000-0000-0000-0000-000000000001",
"0000000-0000-0000-0000-000000000002"
]
}
},
"responses": {
"200": {
"body": {
"storageAccountList": [
{
"subscriptionId": "0000000-0000-0000-0000-000000000001",
"resourceGroup": "tetsRG",
"accountName": "SA_name1",
"location": "WEST US"
},
{
"subscriptionId": "0000000-0000-0000-0000-000000000001",
"resourceGroup": "tetsRG",
"accountName": "SA_name2",
"location": "WEST US"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"operationId": "ProviderActions_ListInUseStorageAccounts",
"title": "ListInUseStorageAccountsWithoutSubscriptions",
"parameters": {
"api-version": "2024-06-27",
"parameters": {}
},
"responses": {
"200": {
"body": {
"storageAccountList": [
{
"subscriptionId": "0000000-0000-0000-0000-000000000001",
"resourceGroup": "tetsRG",
"accountName": "SA_name1",
"location": "WEST US"
},
{
"subscriptionId": "0000000-0000-0000-0000-000000000001",
"resourceGroup": "tetsRG",
"accountName": "SA_name2",
"location": "WEST US"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"operationId": "ProviderActions_Onboard",
"title": "Onboard",
"parameters": {
"api-version": "2024-06-27",
"parameters": {
"subscriptionIds": [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001"
]
}
},
"responses": {
"200": {
"body": {
"subscriptionIds": [
"00000000-0000-0000-0000-000000000000",
"00000000-0000-0000-0000-000000000001"
]
}
},
"202": {
"headers": {
"Location": "https://management.azure.com/providers/Microsoft.AppComplianceAutomation/operationResults/{operationId}",
"Azure-AsyncOperation": "https://management.azure.com/providers/Microsoft.AppComplianceAutomation/operationStatuses/{operationId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"title": "Operations_List",
"operationId": "Operations_List",
"parameters": {
"api-version": "2024-06-27"
},
"responses": {
"200": {
"body": {
"value": [
{
"name": "Microsoft.AppComplianceAutomation/reports/write",
"isDataAction": false,
"display": {
"provider": "Microsoft AppComplianceAutomation",
"resource": "Microsoft.AppComplianceAutomation/reports",
"operation": "Microsoft.AppComplianceAutomation/reports/write",
"description": "Create new reports."
}
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"operationId": "ProviderActions_CheckNameAvailability",
"title": "Report_CheckNameAvailability",
"parameters": {
"api-version": "2024-06-27",
"parameters": {
"name": "reportABC",
"type": "Microsoft.AppComplianceAutomation/reports"
}
},
"responses": {
"200": {
"body": {
"message": "An report named 'reportABC' is already in use.",
"nameAvailable": false,
"reason": "AlreadyExists"
}
}
}
}
Loading

0 comments on commit 74242d7

Please sign in to comment.