mirror of https://github.com/hashicorp/packer
* Add broken requires statement test case * Add test case to reproduce invalid LastExitCodepull/9040/head
parent
35df3914d2
commit
38f799df3e
@ -0,0 +1,19 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": ["invalid-cmdlet"],
|
||||
"valid_exit_codes": ["1"]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": ["#Requires -Version 10.0"],
|
||||
"valid_exit_codes": ["1"]
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"script": "../../provisioner/powershell/test-fixtures/scripts/set_version_latest.ps1"
|
||||
},
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": "sc.exe start Life",
|
||||
"valid_exit_codes": ["1060"]
|
||||
}
|
||||
@ -1,5 +0,0 @@
|
||||
{
|
||||
"type": "powershell",
|
||||
"inline": ["invalid-cmdlet"],
|
||||
"valid_exit_codes": ["1"]
|
||||
}
|
||||
@ -0,0 +1,19 @@
|
||||
Set-StrictMode -Version Latest
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
function test
|
||||
{
|
||||
|
||||
$myNumbersCollection = 1..5
|
||||
|
||||
if($myNumbersCollection -contains 3)
|
||||
{
|
||||
"collection contains 3"
|
||||
}
|
||||
else
|
||||
{
|
||||
"collection doesn't contain 3"
|
||||
}
|
||||
}
|
||||
|
||||
test
|
||||
Loading…
Reference in new issue