forked from Azure/AzureStack-Tools
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathToolTestingScript.ps1
More file actions
50 lines (44 loc) · 2.15 KB
/
ToolTestingScript.ps1
File metadata and controls
50 lines (44 loc) · 2.15 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
param (
[parameter(mandatory=$true, HelpMessage="Azure Stack One Node host address or name such as '1.2.3.4'")]
[string] $HostComputer,
[Parameter(mandatory=$true, HelpMessage="The Admin ARM endpoint of the Azure Stack Environment")]
[string] $ArmEndpoint,
[parameter(HelpMessage="NAT computer name in this Azure Stack Instance")]
[string] $natServer = "AzS-BGPNAT01",
[parameter(HelpMessage="Administrator user name of this Azure Stack Instance")]
[string] $AdminUser = "administrator",
[parameter(HelpMessage="Administrator Azure Stack Environment Name")]
[string] $EnvironmentName = "AzureStackAdmin",
[parameter(mandatory=$true, HelpMessage="Administrator password used to deploy this Azure Stack instance")]
[securestring] $AdminPassword,
[parameter(mandatory=$true, HelpMessage="The AAD service admin user name of this Azure Stack Instance")]
[string] $AzureStackServiceAdmin,
[parameter(mandatory=$true, HelpMessage="AAD Service Admin password used to deploy this Azure Stack instance")]
[securestring] $AzureStackServiceAdminPassword
)
# Set environment varibles to pass along testing variables
$global:HostComputer = $HostComputer
$global:ArmEndpoint = $ArmEndpoint
$global:natServer = $natServer
$global:AdminUser = $AdminUser
$global:AdminPassword = $AdminPassword
$global:AzureStackServiceAdmin = $AzureStackServiceAdmin
$global:AzureStackServiceAdminPassword = $AzureStackServiceAdminPassword
$global:EnvironmentName = $EnvironmentName
$ServiceAdminCreds = New-Object System.Management.Automation.PSCredential "$global:AzureStackServiceAdmin", ($global:AzureStackServiceAdminPassword)
$global:AzureStackLoginCredentials = $ServiceAdminCreds
$global:VPNConnectionName = "AzureStackTestVPN"
#Start running tests in correct order
Set-Location ..\Connect
Invoke-Pester
Set-Location ..\ServiceAdmin
Invoke-Pester
Set-Location ..\Infrastructure
Invoke-Pester
Set-Location ..\ComputeAdmin
Invoke-Pester
Set-Location ..\ToolTestingUtils\
#Disconnect and Remove VPN Connection
Write-Verbose "Disconnecting and removing vpn connection"
rasdial $global:VPNConnectionName /d
Remove-VpnConnection -Name $global:VPNConnectionName