Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tps tests - add test cases by leveraging some green field typespec files #1414

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
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
Loading