@@ -38,6 +38,18 @@ if($DeploySource -eq "class"){
38
38
# Write-Warning('-->>------------>>--')
39
39
# Get-FriendlySQLServerVersion -SqlServerConnection $SqlServerConnection
40
40
# 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
+
41
53
Log- Output(' Run All Tests... Run Bootstrap Tests...' )
42
54
$parameters = @ {
43
55
SqlServerConnection = $SqlServerConnection
@@ -112,6 +124,18 @@ $parameters = @{
112
124
}
113
125
Invoke-TestsFromFile @parameters ;
114
126
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
+
115
139
Log- Output(' Run All Tests... tSQLt EXTERNAL_ACCESS_KEY_EXISTS Tests...' )
116
140
$parameters = @ {
117
141
SqlServerConnection = $SqlServerConnection
@@ -123,6 +147,18 @@ $parameters = @{
123
147
}
124
148
Invoke-TestsFromFile @parameters ;
125
149
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
+
126
162
Log- Output(' Run All Tests... tSQLt EXTERNAL_ACCESS Tests...' )
127
163
$parameters = @ {
128
164
SqlServerConnection = $SqlServerConnection
0 commit comments