Skip to content

Commit

Permalink
Require PowerShell 7 for running e2e script (#3232)
Browse files Browse the repository at this point in the history
  • Loading branch information
David R. Williamson authored Mar 31, 2023
1 parent f57411a commit cef89df
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
11 changes: 11 additions & 0 deletions azureiot.sln
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,16 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{8964
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SecurityProviderTpmSimulator", "security\tpm\samples\SecurityProviderTpmSimulator\SecurityProviderTpmSimulator.csproj", "{184F07FC-A5CA-43F5-8742-0B6DF6825A1F}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "prerequisites", "prerequisites", "{CA137E4E-4684-442D-92FC-20ADACCB5D62}"
ProjectSection(SolutionItems) = preProject
e2e\test\prerequisites\E2ETestsSetup\e2eTestsSetup.ps1 = e2e\test\prerequisites\E2ETestsSetup\e2eTestsSetup.ps1
e2e\test\prerequisites\E2ETestsSetup\generateArmTemplate.ps1 = e2e\test\prerequisites\E2ETestsSetup\generateArmTemplate.ps1
e2e\test\prerequisites\E2ETestsSetup\LoadEnvironmentVariablesFromKeyVault.ps1 = e2e\test\prerequisites\E2ETestsSetup\LoadEnvironmentVariablesFromKeyVault.ps1
e2e\test\prerequisites\readme.md = e2e\test\prerequisites\readme.md
e2e\test\prerequisites\E2ETestsSetup\test-resources.bicep = e2e\test\prerequisites\E2ETestsSetup\test-resources.bicep
e2e\test\prerequisites\E2ETestsSetup\test-resources.json = e2e\test\prerequisites\E2ETestsSetup\test-resources.json
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -525,6 +535,7 @@ Global
{B0562F71-1772-4451-9379-EC42D2A57C96} = {464E5F28-748B-4A6C-94B8-A5725F57F62C}
{89643F18-7B22-41BD-8342-49251943C984} = {4CF9A9B8-9D3F-44F6-B965-DF2B7EEA024E}
{184F07FC-A5CA-43F5-8742-0B6DF6825A1F} = {89643F18-7B22-41BD-8342-49251943C984}
{CA137E4E-4684-442D-92FC-20ADACCB5D62} = {9C260BF0-1CCA-45A2-AAB8-6419291B8B88}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {AF61665D-340A-494B-9705-571456BDC752}
Expand Down
9 changes: 9 additions & 0 deletions e2e/test/prerequisites/E2ETestsSetup/e2eTestsSetup.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,15 @@ $startTime = (Get-Date)
$ErrorActionPreference = "Stop"
$WarningActionPreference = "Continue"

########################################################################################################
# Check PowerShell version
########################################################################################################
if ($PSversiontable.PSVersion -lt "7.0.0")
{
Write-Error "This script requires PowerShell v7. Please install it and rerun."
exit
}

########################################################################################################
# Log the values of optional parameters passed
########################################################################################################
Expand Down

0 comments on commit cef89df

Please sign in to comment.