arm-ttk

所属分类:collect
开发工具:PowerShell
文件大小:0KB
下载次数:0
上传日期:2023-07-24 05:55:58
上 传 者sh-1993
说明:  Azure资源管理器模板工具包,
(Azure Resource Manager Template Toolkit,)

文件列表:
CODE_OF_CONDUCT.md (453, 2023-11-22)
LICENSE (1162, 2023-11-22)
SECURITY.md (2865, 2023-11-22)
arm-ttk/ (0, 2023-11-22)
arm-ttk/AzRMTester.psd1 (224, 2023-11-22)
arm-ttk/ConvertFrom-JSON.ps1 (4448, 2023-11-22)
arm-ttk/Expand-AzTemplate.ps1 (25830, 2023-11-22)
arm-ttk/Find-JsonContent.ps1 (6774, 2023-11-22)
arm-ttk/Format-AzTemplate.ps1 (5358, 2023-11-22)
arm-ttk/GitHubWorkflow/ (0, 2023-11-22)
arm-ttk/GitHubWorkflow/Jobs/ (0, 2023-11-22)
arm-ttk/GitHubWorkflow/Jobs/RunTTK.psd1 (91, 2023-11-22)
arm-ttk/GitHubWorkflow/Jobs/TestPowerShellOnLinux.psd1 (116, 2023-11-22)
arm-ttk/GitHubWorkflow/Jobs/UpdateTTKCache.psd1 (130, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/ (0, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/CheckoutTTK.psd1 (216, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/InstallPester.ps1 (467, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/RunPester.ps1 (1482, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/RunTTK.ps1 (161, 2023-11-22)
arm-ttk/GitHubWorkflow/Steps/UpdateTTKCache.psd1 (472, 2023-11-22)
arm-ttk/Import-Json.ps1 (1561, 2023-11-22)
arm-ttk/Regex/ (0, 2023-11-22)
arm-ttk/Regex/ARM/ (0, 2023-11-22)
arm-ttk/Regex/ARM/API_Version.regex.txt (400, 2023-11-22)
arm-ttk/Regex/ARM/BracketOrQuote.regex.txt (330, 2023-11-22)
arm-ttk/Regex/ARM/List_Function.regex.txt (1267, 2023-11-22)
arm-ttk/Regex/ARM/Parameter.regex.ps1 (786, 2023-11-22)
arm-ttk/Regex/ARM/Template_Expression.regex.txt (1786, 2023-11-22)
arm-ttk/Regex/ARM/Template_Function.regex.ps1 (1558, 2023-11-22)
... ...

# Azure Resource Manager Template Toolkit (arm-ttk) The code in this repository can be used for analyzing and testing [Azure Resource Manager Templates](https://docs.microsoft.com/azure/templates/). The tests will check a template or set of templates for coding best practices. There are some checks for simple syntactical errors but the intent is not to re-implement tests or checks that are provided by the platform (e.g. the /validate api). >**Note:** >Starting with the 0.10 release, [Bicep](https://github.com/Azure/bicep) now contains all of the deploymentTemplate test cases included in the TTK. We will begin moving the investment in new tests to the Bicep linter. The TTK will remain available to support available JSON and createUiDefinition scenarios. ## Using the TTK For detailed instruction on how to use the arm-ttk, see this [readme](/arm-ttk/README.md). More information can be found in the [documentation](http://docs.microsoft.com/azure/azure-resource-manager/templates/test-toolkit). For a guided tutorial on the arm-ttk, check out this [MS LEARN module](https://docs.microsoft.com/learn/modules/arm-template-test/). ## Philosophy A little bit about the tests... These are the tests that are used to validate templates for the [Azure QuickStart Repo](https://github.com/Azure/azure-quickstart-templates) and the [Azure Marketplace](https://azuremarketplace.microsoft.com/marketplace/). The purpose is to ensure a standard or consistent set of coding practices to make it easier to develop expertise using the template language (easy to read, write, debug). As for the type, number and nature of the tests a test should check for something in the following categories (add more as you think of them :)) - Validating the author's intent (unused parameters or variables) - Security practices for the language (outputting secrets in plain text) - Using the appropriate language construct for the task at hand (using environmental functions instead of hard-coding values) Not everything is appropriate for a universal set of tests and not every test will apply to every scenario, so the framework allows for easy expansion and individual selection of tests. ## Running Unit Tests locally before request a PR Tests can be run directly in PowerShell, or run from the command line using a wrapper script. You can run all of the unit tests by using **.\arm-ttk.tests.ps1**. This will run the full suite of unit tests against the tests json files. use: # set your location in the project directory: Set-Location -Path "$(YourGithubProjectFolder)\arm-ttk\unit-tests" # import the module from the current branch, use -Force to make sure you have imported any code changes Import-Module ..\arm-ttk\arm-ttk.psd1 -Force # These are the same tests that run in the pipeline when doing a commit or a pull request (PR). .\arm-ttk.tests.ps1 ## Contributing This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com. When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repositories using our CLA. This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.

近期下载者

相关文件


收藏者