Skip to content

Commit 0a183fa

Browse files
authored
Refactor integration tests (#813)
* create database once * fix compat level test * fix compat + logs * start func host in the beginning * fix change tracking * fix tests * fix tests * add CSharpscript and fix change tracking * set port * update xunit analyzers & temp skip failling tests * update port from fixture * pass console writeline as logger * enable identity tests * fix case sensitive tests + temp disable identity * fix indent * AddProductWithIdentityColumnIncluded fix * AddProductWithIdentityColumnIncluded * cleanup * remove extra fixture * default port * fix csx
1 parent ad7eac5 commit 0a183fa

23 files changed

+456
-242
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
CREATE PROCEDURE [SelectProductsCost]
1+
CREATE PROCEDURE [SelectProductsCost]
22
@cost INT
3-
AS
4-
SELECT [ProductId], [Name], [Cost]
3+
AS
4+
SELECT [ProductId], [Name], [Cost]
55
FROM [dbo].[Products]
66
WHERE [Cost] = @cost;

samples/Database/Tables/Products.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [Products] (
1+
DROP TABLE IF EXISTS [Products];
2+
3+
CREATE TABLE [Products] (
24
[ProductId] [int] NOT NULL PRIMARY KEY,
35
[Name] [nvarchar](100) NULL,
46
[Cost] [int] NULL

samples/Database/Tables/ProductsCostNotNull.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [ProductsCostNotNull] (
1+
DROP TABLE IF EXISTS [ProductsCostNotNull];
2+
3+
CREATE TABLE [ProductsCostNotNull] (
24
[ProductId] [int] NOT NULL PRIMARY KEY,
35
[Name] [nvarchar](100) NULL,
46
[Cost] [int] NOT NULL

samples/Database/Tables/ProductsNameNotNull.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [ProductsNameNotNull] (
1+
DROP TABLE IF EXISTS [ProductsNameNotNull];
2+
3+
CREATE TABLE [ProductsNameNotNull] (
24
[ProductId] [int] NOT NULL PRIMARY KEY,
35
[Name] [nvarchar](100) NOT NULL,
46
[Cost] [int] NULL

samples/Database/Tables/ProductsWithDefaultPK.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [ProductsWithDefaultPK] (
1+
DROP TABLE IF EXISTS [ProductsWithDefaultPK];
2+
3+
CREATE TABLE [ProductsWithDefaultPK] (
24
[ProductGuid] [uniqueidentifier] PRIMARY KEY NOT NULL DEFAULT(newsequentialid()),
35
[Name] [nvarchar](100) NULL,
46
[Cost] [int] NULL

samples/Database/Tables/ProductsWithIdentity.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [ProductsWithIdentity] (
1+
DROP TABLE IF EXISTS [ProductsWithIdentity];
2+
3+
CREATE TABLE [ProductsWithIdentity] (
24
[ProductId] [int] PRIMARY KEY NOT NULL IDENTITY(1,1),
35
[Name] [nvarchar](100) NULL,
46
[Cost] [int] NULL

samples/Database/Tables/ProductsWithMultiplePrimaryColumnsAndIdentity.sql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
CREATE TABLE [ProductsWithMultiplePrimaryColumnsAndIdentity] (
1+
DROP TABLE IF EXISTS [ProductsWithMultiplePrimaryColumnsAndIdentity];
2+
3+
CREATE TABLE [ProductsWithMultiplePrimaryColumnsAndIdentity] (
24
[ProductId] [int] NOT NULL IDENTITY(1,1),
35
[ExternalId] [int] NOT NULL,
46
[Name] [nvarchar](100) NULL,
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
CREATE VIEW ProductNames
2-
AS
3-
SELECT p.Name FROM Products p;
2+
AS
3+
SELECT p.Name FROM Products p;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP PROCEDURE IF EXISTS [SelectProductsCost];
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
DROP VIEW IF EXISTS ProductNames;

0 commit comments

Comments
 (0)