Skip to content

Commit

Permalink
Merge pull request #14 from sam-cogan/samcogan/update-ttk-0-22
Browse files Browse the repository at this point in the history
Update TTK to version 0.22
  • Loading branch information
sam-cogan authored Dec 23, 2022
2 parents 1d58fb6 + 909ae8a commit aff7530
Show file tree
Hide file tree
Showing 13 changed files with 8,156 additions and 2,636 deletions.
111 changes: 55 additions & 56 deletions Tests/testfiles/bicep/sql.json
Original file line number Diff line number Diff line change
@@ -1,57 +1,56 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.1.14562",
"templateHash": "3744673454355951104"
}
},
"parameters": {
"serverName": {
"type": "string",
"defaultValue": "[uniqueString('sql', resourceGroup().id)]"
},
"sqlDBName": {
"type": "string",
"defaultValue": "SampleDB"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"administratorLogin": {
"type": "string"
},
"administratorLoginPassword": {
"type": "secureString"
}
},
"functions": [],
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2019-06-01-preview",
"name": "[parameters('serverName')]",
"location": "[parameters('location')]",
"properties": {
"administratorLogin": "[parameters('administratorLogin')]",
"administratorLoginPassword": "[parameters('administratorLoginPassword')]"
}
},
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2020-08-01-preview",
"name": "[format('{0}/{1}', parameters('serverName'), parameters('sqlDBName'))]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard",
"tier": "Standard"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
]
}
]
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.1124.51302",
"templateHash": "11520551701914779143"
}
},
"parameters": {
"serverName": {
"type": "string",
"defaultValue": "[uniqueString('sql', resourceGroup().id)]"
},
"sqlDBName": {
"type": "string",
"defaultValue": "SampleDB"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
},
"administratorLogin": {
"type": "string"
},
"administratorLoginPassword": {
"type": "secureString"
}
},
"resources": [
{
"type": "Microsoft.Sql/servers",
"apiVersion": "2019-06-01-preview",
"name": "[parameters('serverName')]",
"location": "[parameters('location')]",
"properties": {
"administratorLogin": "[parameters('administratorLogin')]",
"administratorLoginPassword": "[parameters('administratorLoginPassword')]"
}
},
{
"type": "Microsoft.Sql/servers/databases",
"apiVersion": "2020-08-01-preview",
"name": "[format('{0}/{1}', parameters('serverName'), parameters('sqlDBName'))]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard",
"tier": "Standard"
},
"dependsOn": [
"[resourceId('Microsoft.Sql/servers', parameters('serverName'))]"
]
}
]
}
95 changes: 47 additions & 48 deletions Tests/testfiles/bicep/storage.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,48 @@
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.1.14562",
"templateHash": "11781293324285350714"
}
},
"parameters": {
"storageAccountName": {
"type": "string"
},
"containerName": {
"type": "string",
"defaultValue": "logs"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"functions": [],
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "StorageV2",
"properties": {
"accessTier": "Hot"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-06-01",
"name": "[format('{0}/default/{1}', parameters('storageAccountName'), parameters('containerName'))]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
}
]
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.0",
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.4.1124.51302",
"templateHash": "5431544741610132410"
}
},
"parameters": {
"storageAccountName": {
"type": "string"
},
"containerName": {
"type": "string",
"defaultValue": "logs"
},
"location": {
"type": "string",
"defaultValue": "[resourceGroup().location]"
}
},
"resources": [
{
"type": "Microsoft.Storage/storageAccounts",
"apiVersion": "2019-06-01",
"name": "[parameters('storageAccountName')]",
"location": "[parameters('location')]",
"sku": {
"name": "Standard_LRS",
"tier": "Standard"
},
"kind": "StorageV2",
"properties": {
"accessTier": "Hot"
}
},
{
"type": "Microsoft.Storage/storageAccounts/blobServices/containers",
"apiVersion": "2019-06-01",
"name": "[format('{0}/default/{1}', parameters('storageAccountName'), parameters('containerName'))]",
"dependsOn": [
"[resourceId('Microsoft.Storage/storageAccounts', parameters('storageAccountName'))]"
]
}
]
}
4 changes: 2 additions & 2 deletions arm-ttk-extension-xplatform/arm-ttk/Test-AzTemplate.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -665,10 +665,10 @@ Each test script has access to a set of well-known variables:
if ($PSCmdlet.ParameterSetName -eq 'NearbyTemplate') {
# attempt to find one in the current directory and it's subdirectories
$possibleJsonFiles = @(Get-ChildItem -Filter *.json -Recurse |
Sort-Object Name -Descending ) <# | # (sort by name descending so that MainTemplate.json comes first).
Sort-Object Name -Descending) <# | # (sort by name descending so that MainTemplate.json comes first).
Where-Object {
'azureDeploy.json', 'mainTemplate.json' -contains $_.Name
}) #>
})#>


# If more than one template was found, warn which one we'll be testing.
Expand Down
136 changes: 0 additions & 136 deletions arm-ttk-extension-xplatform/arm-ttk/arm-ttk.ezformat.ps1

This file was deleted.

2 changes: 1 addition & 1 deletion arm-ttk-extension-xplatform/arm-ttk/arm-ttk.psd1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@{
ModuleVersion = 0.17
ModuleVersion = 0.22
ModuleToProcess = 'arm-ttk.psm1'
Description = 'Validation tools for Azure Resource Manager Templates'
FormatsToProcess = 'arm-ttk.format.ps1xml'
Expand Down
Loading

0 comments on commit aff7530

Please sign in to comment.