@@ -38,6 +38,18 @@ if($DeploySource -eq "class"){
3838# Write-Warning('-->>------------>>--')
3939# Get-FriendlySQLServerVersion -SqlServerConnection $SqlServerConnection
4040# Write-Warning('--<<------------<<--')
41+ Log- Output(' Run All Tests... Disabling External Access...' )
42+ $parameters = @ {
43+ SqlServerConnection = $SqlServerConnection
44+ HelperSQLPath = $HelperSQLPath
45+ Elevated = $true
46+ Files = @ (
47+ (Join-Path $TestsPath " DisableExternalAccess.sql" | Resolve-Path )
48+ )
49+ DatabaseName = $TestDbName
50+ }
51+ Invoke-SQLFileOrQuery @parameters ;
52+
4153Log- Output(' Run All Tests... Run Bootstrap Tests...' )
4254$parameters = @ {
4355 SqlServerConnection = $SqlServerConnection
@@ -112,6 +124,18 @@ $parameters = @{
112124}
113125Invoke-TestsFromFile @parameters ;
114126
127+ Log- Output(' Run All Tests... Installing Assembly Key (needed for 2016 only)...' )
128+ $parameters = @ {
129+ SqlServerConnection = $SqlServerConnection
130+ HelperSQLPath = $HelperSQLPath
131+ Elevated = $true
132+ Files = @ (
133+ (Join-Path $TestsPath " Install(tSQLtAssemblyKey).sql" | Resolve-Path )
134+ )
135+ DatabaseName = $TestDbName
136+ }
137+ Invoke-SQLFileOrQuery @parameters ;
138+
115139Log- Output(' Run All Tests... tSQLt EXTERNAL_ACCESS_KEY_EXISTS Tests...' )
116140$parameters = @ {
117141 SqlServerConnection = $SqlServerConnection
@@ -123,6 +147,18 @@ $parameters = @{
123147}
124148Invoke-TestsFromFile @parameters ;
125149
150+ Log- Output(' Run All Tests... Enabling External Access...' )
151+ $parameters = @ {
152+ SqlServerConnection = $SqlServerConnection
153+ HelperSQLPath = $HelperSQLPath
154+ Elevated = $true
155+ Files = @ (
156+ (Join-Path $TestsPath " EnableExternalAccess.sql" | Resolve-Path )
157+ )
158+ DatabaseName = $TestDbName
159+ }
160+ Invoke-SQLFileOrQuery @parameters ;
161+
126162Log- Output(' Run All Tests... tSQLt EXTERNAL_ACCESS Tests...' )
127163$parameters = @ {
128164 SqlServerConnection = $SqlServerConnection
0 commit comments