Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This stores the array of the number of passed and failed test
- $passed = @()
- $failed = @()
- Describe "Template Syntax" {
- It "Has a JSON template" {
- $fileLocation = "$hereazuredeploy.json"
- $fileCheck = $fileLocation | Test-Path
- if ($fileCheck -eq $true) { $passed = $passed + 1
- Write-Host "1st file exist " }
- if ($fileCheck -eq $false) { $failed = $failed + 1
- Write-Host "1st file does exist" }
- }
- It "Has a parameters file" {
- $fileLocation ="$hereazuredeploy.parameters*.json"
- $fileCheck = $fileLocation | Test-Path
- if ($fileCheck -eq $true) { $passed = $passed + 1;
- Write-Host "2nd file exist "}
- if ($fileCheck -eq $false) { $failed = $failed + 1
- Write-Host "2nd file does exist" }
- }
- PrintArgs
- }
- function PrintArgs(){
- Write-Host -ForegroundColor yellow "Passed: $($passed.Length) Failed: $($failed.Length)"
- }
Add Comment
Please, Sign In to add comment