Skip to content

Commit

Permalink
Add extra Storage api version acceptance tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Schulte committed May 25, 2016
1 parent ef4d3ed commit 2f45870
Show file tree
Hide file tree
Showing 6 changed files with 1,855 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,6 @@ namespace AutoRest.Generator.AzureResourceSchema.Tests
[Collection("AutoRest Azure Resource Schema Tests")]
public static class AcceptanceTests
{
[Fact]
public static void Storage()
{
RunSwaggerTest("Storage", "2016-01-01", "storage.json");
}

[Fact]
public static void Batch()
{
Expand Down Expand Up @@ -59,6 +53,24 @@ public static void Network()
RunSwaggerTest("Network", "2016-03-30", "network.json");
}

[Fact]
public static void Storage_2015_05_01_preview()
{
RunSwaggerTest("Storage", "2015-05-01-preview", "storage.json");
}

[Fact]
public static void Storage_2015_06_15()
{
RunSwaggerTest("Storage", "2015-06-15", "storage.json");
}

[Fact]
public static void Storage_2016_01_01()
{
RunSwaggerTest("Storage", "2016-01-01", "storage.json");
}

[Fact]
public static void Web()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
</ProjectReference>
</ItemGroup>
<ItemGroup>
<Content Include="Expected\Storage\2016-01-01\Microsoft.Storage.json">
<Content Include="Expected\Storage\2015-05-01-preview\Microsoft.Storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Expected\Batch\2015-12-01\Microsoft.Batch.json">
Expand Down Expand Up @@ -111,10 +111,16 @@
<Content Include="Expected\CDN\2015-06-01\Microsoft.Cdn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Expected\Storage\2015-06-15\Microsoft.Storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Expected\Storage\2016-01-01\Microsoft.Storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<None Include="packages.config">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
<Content Include="Swagger\Storage\2016-01-01\storage.json">
<Content Include="Swagger\Storage\2015-05-01-preview\storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Swagger\Batch\2015-12-01\BatchManagement.json">
Expand All @@ -141,6 +147,12 @@
<Content Include="Swagger\CDN\2016-04-02\cdn.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Swagger\Storage\2015-06-15\storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
<Content Include="Swagger\Storage\2016-01-01\storage.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\..\Modelers\Swagger.Tests\AutoRest.Modeler.Swagger.Tests.csproj">
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
{
"id": "http://schema.management.azure.com/schemas/2015-05-01-preview/Microsoft.Storage.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.Storage",
"description": "Microsoft Storage Resource Types",
"resourceDefinitions": {
"storageAccounts": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Microsoft.Storage/storageAccounts"
]
},
"apiVersion": {
"type": "string",
"enum": [
"2015-05-01-preview"
]
},
"properties": {
"oneOf": [
{
"$ref": "#/definitions/StorageAccountPropertiesCreateParameters"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
}
},
"required": [
"type",
"apiVersion",
"properties"
],
"description": "Microsoft.Storage/storageAccounts"
}
},
"definitions": {
"StorageAccountPropertiesCreateParameters": {
"type": "object",
"properties": {
"accountType": {
"oneOf": [
{
"type": "string",
"enum": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Gets or sets the account type. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"id": "http://schema.management.azure.com/schemas/2015-06-15/Microsoft.Storage.json#",
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Microsoft.Storage",
"description": "Microsoft Storage Resource Types",
"resourceDefinitions": {
"storageAccounts": {
"type": "object",
"properties": {
"type": {
"type": "string",
"enum": [
"Microsoft.Storage/storageAccounts"
]
},
"apiVersion": {
"type": "string",
"enum": [
"2015-06-15"
]
},
"location": {
"type": "string",
"description": "Resource location"
},
"tags": {
"oneOf": [
{
"type": "object",
"additionalProperties": {
"type": "string"
}
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Resource tags"
},
"properties": {
"oneOf": [
{
"$ref": "#/definitions/StorageAccountPropertiesCreateParameters"
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
]
}
},
"required": [
"type",
"apiVersion",
"location",
"properties"
],
"description": "Microsoft.Storage/storageAccounts"
}
},
"definitions": {
"StorageAccountPropertiesCreateParameters": {
"type": "object",
"properties": {
"accountType": {
"oneOf": [
{
"type": "string",
"enum": [
"Standard_LRS",
"Standard_ZRS",
"Standard_GRS",
"Standard_RAGRS",
"Premium_LRS"
]
},
{
"$ref": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#/definitions/expression"
}
],
"description": "Gets or sets the account type. Possible values include: 'Standard_LRS', 'Standard_ZRS', 'Standard_GRS', 'Standard_RAGRS', 'Premium_LRS'"
}
},
"required": [
"accountType"
]
}
}
}
Loading

0 comments on commit 2f45870

Please sign in to comment.