Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pipelines/dwsql-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

# DwSql Integration Testing Pipeline config is split into two jobs:
# 1) LinuxTests -> Run SQL Server 2019 in Linux Docker Image
# 1) LinuxTests -> Run SQL Server 2025 in Linux Docker Image
# 2) WindowsTests -> Run LocalDB preinstalled on machine

trigger:
Expand Down Expand Up @@ -159,8 +159,8 @@ jobs:
# The variable setting on the pipeline UI sets the connection string
# for the linux job above.
data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True;
InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi
SqlVersionCode: '15.0'
InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi
SqlVersionCode: '17.0'
Comment thread
RubenCerna2079 marked this conversation as resolved.

steps:
- task: CmdLine@2
Expand Down
10 changes: 5 additions & 5 deletions .pipelines/mssql-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Licensed under the MIT License.

# MsSql Integration Testing Pipeline config is split into parallel jobs:
# 1) linux (disabled) -> Run SQL Server 2019 in Linux Docker Image
# 1) linux (disabled) -> Run SQL Server 2025 in Linux Docker Image
# 2) windows_combined -> GraphQL, REST, Unit, HotReload, OpenApi, Auth, Telemetry, Caching on LocalDB
# 3) windows_configuration -> Configuration tests on LocalDB (with schema init)

Expand Down Expand Up @@ -176,8 +176,8 @@ jobs:
# The variable setting on the pipeline UI sets the connection string
# for the linux job above.
data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True;
InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi
SqlVersionCode: '15.0'
InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi
SqlVersionCode: '17.0'

Comment thread
RubenCerna2079 marked this conversation as resolved.
steps:
- template: templates/mssql-test-steps.yml
Expand All @@ -199,8 +199,8 @@ jobs:
# The variable setting on the pipeline UI sets the connection string
# for the linux job above.
data-source.connection-string: Server=(localdb)\MSSQLLocalDB;Persist Security Info=False;Integrated Security=True;MultipleActiveResultSets=False;Connection Timeout=30;TrustServerCertificate=True;
InstallerUrl: https://download.microsoft.com/download/7/c/1/7c14e92e-bdcb-4f89-b7cf-93543e7112d1/SqlLocalDB.msi
SqlVersionCode: '15.0'
InstallerUrl: https://download.microsoft.com/download/dea8c210-c44a-4a9d-9d80-0c81578860c5/ENU/SqlLocalDB.msi
SqlVersionCode: '17.0'

Comment thread
RubenCerna2079 marked this conversation as resolved.
steps:
- template: templates/mssql-test-steps.yml
Expand Down
2 changes: 1 addition & 1 deletion scripts/start-mssql-server.bash
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ echo "forceencryption = 1" >> $CERT_DIR/mssql.conf
cat $CERT_DIR/mssql.conf

# Start mssql-server by volume mounting the cert, key and conf files.
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$DOCKER_SQL_PASS" -p 1433:1433 --name customerdb -h customerdb -v $CERT_DIR/mssql.conf:/var/opt/mssql/mssql.conf -v $CERT_DIR/mssql.pem:/var/opt/mssql/mssql.pem -v $CERT_DIR/mssql.key:/var/opt/mssql/mssql.key -d mcr.microsoft.com/mssql/server:2019-latest
docker run -e "ACCEPT_EULA=Y" -e "MSSQL_SA_PASSWORD=$DOCKER_SQL_PASS" -p 1433:1433 --name customerdb -h customerdb -v $CERT_DIR/mssql.conf:/var/opt/mssql/mssql.conf -v $CERT_DIR/mssql.pem:/var/opt/mssql/mssql.pem -v $CERT_DIR/mssql.key:/var/opt/mssql/mssql.key -d mcr.microsoft.com/mssql/server:2025-latest
sleep 30
Comment thread
RubenCerna2079 marked this conversation as resolved.
docker logs customerdb

Expand Down
24 changes: 24 additions & 0 deletions src/Service.Tests/DatabaseSchema-MsSql.sql
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ DROP TABLE IF EXISTS stocks;
DROP TABLE IF EXISTS comics;
DROP TABLE IF EXISTS brokers;
DROP TABLE IF EXISTS type_table;
DROP TABLE IF EXISTS vector_type_table;
DROP TABLE IF EXISTS trees;
DROP TABLE IF EXISTS fungi;
DROP TABLE IF EXISTS empty_table;
Expand Down Expand Up @@ -234,6 +235,12 @@ CREATE TABLE type_table(
uuid_types uniqueidentifier DEFAULT newid()
);

CREATE TABLE vector_type_table(
id int IDENTITY(5001, 1) PRIMARY KEY,
vector_data vector(3),
vector_data_max vector(1998)
);

CREATE TABLE trees (
treeId int PRIMARY KEY,
species varchar(max),
Expand Down Expand Up @@ -616,6 +623,23 @@ VALUES
INSERT INTO type_table(id, uuid_types) values(10, 'D1D021A8-47B4-4AE4-B718-98E89C41A161');
SET IDENTITY_INSERT type_table OFF

SET IDENTITY_INSERT vector_type_table ON
INSERT INTO vector_type_table(id, vector_data)
VALUES
(1, '[0.5, 0.25, 0.75]'),
(2, '[1.5, -2.5, 3.5]'),
(3, NULL),
(4, '[1.0, 2.0, 3.0]'),
(5, '[4.0, 5.0, 6.0]'),
(6, '[7.0, 8.0, 9.0]');

INSERT INTO vector_type_table(id, vector_data_max)
VALUES (7, CAST('[' + (
SELECT STRING_AGG(CAST(value AS NVARCHAR(MAX)), ',') WITHIN GROUP (ORDER BY value)
FROM GENERATE_SERIES(1, 1998)
) + ']' AS vector(1998)));
SET IDENTITY_INSERT vector_type_table OFF

SET IDENTITY_INSERT sales ON
INSERT INTO sales(id, item_name, subtotal, tax) VALUES (1, 'Watch', 249.00, 20.59), (2, 'Montior', 120.50, 11.12);
SET IDENTITY_INSERT sales OFF
Expand Down
2 changes: 1 addition & 1 deletion src/Service.Tests/dab-config.MsSql.json
Original file line number Diff line number Diff line change
Expand Up @@ -4022,4 +4022,4 @@
]
}
}
}
}
Loading