Coder Social home page Coder Social logo

ascott18 / arm-ttk Goto Github PK

View Code? Open in Web Editor NEW

This project forked from azure/arm-ttk

0.0 0.0 0.0 1.54 MB

Azure Resource Manager Template Toolkit

Home Page: https://aka.ms/arm-ttk

License: MIT License

PowerShell 99.42% Batchfile 0.06% Shell 0.52%

arm-ttk's Introduction

Azure Resource Manager Template Toolkit (arm-ttk)

The code in this repository can be used for analyzing and testing Azure Resource Manager 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).

Using the TTK

For detailed instruction on how to use the arm-ttk, see this readme. More information can be found in the documentation.

For a guided tutorial on the arm-ttk, check out this MS LEARN module.

Philosophy

A little bit about the tests... These are the tests that are used to validate templates for the Azure QuickStart Repo and the Azure 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.

For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

arm-ttk's People

Contributors

asifma avatar azcloudfarmer avatar bmoore-msft avatar bobbyangers avatar edburns avatar gmarko86 avatar hallihan avatar jbiesta avatar jf781 avatar konjp avatar microsoftopensource avatar rangers-globecar avatar sam-cogan avatar samrobillard avatar samsmithnz avatar startautomating avatar tiefpunkt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.