Skip to content

Commit 5d4cd00

Browse files
authored
Merge branch 'main' into CITesting
2 parents 05bc8ca + 438f48b commit 5d4cd00

106 files changed

Lines changed: 4993 additions & 2524 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the workflow will run
6+
on:
7+
# Triggers the workflow on push or pull request events but only for the main branch
8+
push:
9+
branches: [ main ]
10+
pull_request:
11+
branches: [ main ]
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
17+
jobs:
18+
# This workflow contains a single job called "build"
19+
build:
20+
# The type of runner that the job will run on
21+
runs-on: ubuntu-latest
22+
23+
# Steps represent a sequence of tasks that will be executed as part of the job
24+
steps:
25+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
26+
- uses: actions/checkout@v2
27+
28+
# Runs a single command using the runners shell
29+
- name: Run a one-line script
30+
run: echo Hello, world!
31+
32+
# Runs a set of commands using the runners shell
33+
- name: Run a multi-line script
34+
run: |
35+
echo Add other actions to build,
36+
echo test, and deploy your project.

Build/Build.ssmssqlproj

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,116 +2,115 @@
22
<SqlWorkbenchSqlProject xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Name="Build">
33
<Items>
44
<LogicalFolder Name="Connections" Type="2" Sorted="true">
5-
<Items>
6-
<ConnectionNode Name="Dev_tSQLt:WIN10A\meinse00">
7-
<Created>2014-11-24T18:10:21.4587287-05:00</Created>
8-
<Type>SQL</Type>
9-
<Server>Dev_tSQLt</Server>
10-
<UserName />
11-
<Authentication>Windows Authentication</Authentication>
12-
<InitialDB>tSQLt_dev</InitialDB>
13-
<LoginTimeout>15</LoginTimeout>
14-
<ExecutionTimeout>0</ExecutionTimeout>
15-
<ConnectionProtocol>NotSpecified</ConnectionProtocol>
16-
<ApplicationName>Microsoft SQL Server Management Studio - Query</ApplicationName>
17-
</ConnectionNode>
18-
</Items>
5+
<Items />
196
</LogicalFolder>
207
<LogicalFolder Name="Queries" Type="0" Sorted="true">
218
<Items>
229
<FileNode Name="ChangeDbAndExecuteStatement(tSQLt.Build).sql">
23-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
24-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
10+
<AssociatedConnectionMoniker />
11+
<AssociatedConnSrvName />
2512
<AssociatedConnUserName />
2613
<FullPath>ChangeDbAndExecuteStatement(tSQLt.Build).sql</FullPath>
2714
</FileNode>
2815
<FileNode Name="CreateBuildDb.sql">
29-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
30-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
16+
<AssociatedConnectionMoniker />
17+
<AssociatedConnSrvName />
3118
<AssociatedConnUserName />
3219
<FullPath>CreateBuildDb.sql</FullPath>
3320
</FileNode>
3421
<FileNode Name="Drop(master.tSQLt_testutil).sql">
35-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
36-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
22+
<AssociatedConnectionMoniker />
23+
<AssociatedConnSrvName />
3724
<AssociatedConnUserName />
3825
<FullPath>Drop(master.tSQLt_testutil).sql</FullPath>
3926
</FileNode>
4027
<FileNode Name="Drop(tSQLtAssemblyKey)(Pre2017).sql">
41-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
42-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
28+
<AssociatedConnectionMoniker />
29+
<AssociatedConnSrvName />
4330
<AssociatedConnUserName />
4431
<FullPath>Drop(tSQLtAssemblyKey)(Pre2017).sql</FullPath>
4532
</FileNode>
4633
<FileNode Name="EnableExternalAccess.sql">
47-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
48-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
34+
<AssociatedConnectionMoniker />
35+
<AssociatedConnSrvName />
4936
<AssociatedConnUserName />
5037
<FullPath>EnableExternalAccess.sql</FullPath>
5138
</FileNode>
5239
<FileNode Name="ExecuteAs(tSQLt.Build.SA).sql">
53-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
54-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
40+
<AssociatedConnectionMoniker />
41+
<AssociatedConnSrvName />
5542
<AssociatedConnUserName />
5643
<FullPath>ExecuteAs(tSQLt.Build.SA).sql</FullPath>
5744
</FileNode>
5845
<FileNode Name="ExecuteAs(tSQLt.Build).sql">
59-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
60-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
46+
<AssociatedConnectionMoniker />
47+
<AssociatedConnSrvName />
6148
<AssociatedConnUserName />
6249
<FullPath>ExecuteAs(tSQLt.Build).sql</FullPath>
6350
</FileNode>
6451
<FileNode Name="ExecuteResetValidationServer.sql">
65-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
66-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
52+
<AssociatedConnectionMoniker />
53+
<AssociatedConnSrvName />
6754
<AssociatedConnUserName />
6855
<FullPath>ExecuteResetValidationServer.sql</FullPath>
6956
</FileNode>
57+
<FileNode Name="Facade.CreateAllObjects.ssp.sql">
58+
<AssociatedConnectionMoniker />
59+
<AssociatedConnSrvName />
60+
<AssociatedConnUserName />
61+
<FullPath>Facade.CreateAllObjects.ssp.sql</FullPath>
62+
</FileNode>
63+
<FileNode Name="Facade.CreateDatabase.sql">
64+
<AssociatedConnectionMoniker />
65+
<AssociatedConnSrvName />
66+
<AssociatedConnUserName />
67+
<FullPath>Facade.CreateDatabase.sql</FullPath>
68+
</FileNode>
7069
<FileNode Name="GetFailedTestCount.sql">
71-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
72-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
70+
<AssociatedConnectionMoniker />
71+
<AssociatedConnSrvName />
7372
<AssociatedConnUserName />
7473
<FullPath>GetFailedTestCount.sql</FullPath>
7574
</FileNode>
7675
<FileNode Name="GetSQLServerVersion.sql">
77-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
78-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
76+
<AssociatedConnectionMoniker />
77+
<AssociatedConnSrvName />
7978
<AssociatedConnUserName />
8079
<FullPath>GetSQLServerVersion.sql</FullPath>
8180
</FileNode>
8281
<FileNode Name="GetTestResults.sql">
83-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
84-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
82+
<AssociatedConnectionMoniker />
83+
<AssociatedConnSrvName />
8584
<AssociatedConnUserName />
8685
<FullPath>GetTestResults.sql</FullPath>
8786
</FileNode>
8887
<FileNode Name="CreateLogin(tSQLt.Build).sql">
89-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
90-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
88+
<AssociatedConnectionMoniker />
89+
<AssociatedConnSrvName />
9190
<AssociatedConnUserName />
9291
<FullPath>CreateLogin(tSQLt.Build).sql</FullPath>
9392
</FileNode>
9493
<FileNode Name="GrantBuildPermissions.sql">
95-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
96-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
94+
<AssociatedConnectionMoniker />
95+
<AssociatedConnSrvName />
9796
<AssociatedConnUserName />
9897
<FullPath>GrantBuildPermissions.sql</FullPath>
9998
</FileNode>
10099
<FileNode Name="Install(master.tSQLt_testutil).sql">
101-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
102-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
100+
<AssociatedConnectionMoniker />
101+
<AssociatedConnSrvName />
103102
<AssociatedConnUserName />
104103
<FullPath>Install(master.tSQLt_testutil).sql</FullPath>
105104
</FileNode>
106105
<FileNode Name="Install(tSQLtAssemblyKey).sql">
107-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
108-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
106+
<AssociatedConnectionMoniker />
107+
<AssociatedConnSrvName />
109108
<AssociatedConnUserName />
110109
<FullPath>Install(tSQLtAssemblyKey).sql</FullPath>
111110
</FileNode>
112111
<FileNode Name="PrintVersionInfo.sql">
113-
<AssociatedConnectionMoniker>8c91a03d-f9b4-46c0-a305-b5dcc79ff907:Dev_tSQLt:True</AssociatedConnectionMoniker>
114-
<AssociatedConnSrvName>Dev_tSQLt</AssociatedConnSrvName>
112+
<AssociatedConnectionMoniker />
113+
<AssociatedConnSrvName />
115114
<AssociatedConnUserName />
116115
<FullPath>PrintVersionInfo.sql</FullPath>
117116
</FileNode>

Build/CreateLogin(tSQLt.Build).sql

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,21 +9,25 @@ CREATE PROCEDURE #ForceDropDatabase
99
@db_name NVARCHAR(MAX)
1010
AS
1111
BEGIN
12+
SET @db_name = PARSENAME(@db_name,1);
13+
DECLARE @cmd NVARCHAR(MAX);
1214
IF(DB_ID(@db_name)IS NOT NULL)
1315
BEGIN
1416
BEGIN TRY
15-
EXEC('
17+
SET @cmd = '
1618
USE master;
17-
ALTER DATABASE '+@db_name+' SET ONLINE WITH ROLLBACK IMMEDIATE;
18-
ALTER DATABASE '+@db_name+' SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE;
19-
USE '+@db_name+';
20-
ALTER DATABASE '+@db_name+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
21-
');
19+
ALTER DATABASE '+QUOTENAME(@db_name)+' SET ONLINE WITH ROLLBACK IMMEDIATE;
20+
ALTER DATABASE '+QUOTENAME(@db_name)+' SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE;
21+
USE '+QUOTENAME(@db_name)+';
22+
ALTER DATABASE '+QUOTENAME(@db_name)+' SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
23+
';
24+
EXEC(@cmd);
2225
END TRY BEGIN CATCH END CATCH;
23-
EXEC('
26+
SET @cmd = '
2427
USE master;
25-
DROP DATABASE '+@db_name+';
26-
');
28+
DROP DATABASE '+QUOTENAME(@db_name)+';
29+
';
30+
EXEC(@cmd);
2731
END;
2832
END
2933
GO

Build/EnableExternalAccess.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
EXEC tSQLt.EnableExternalAccess;
1+
EXEC tSQLt.EnableExternalAccess @try = 1;

0 commit comments

Comments
 (0)