segovoni / sql-server-demos-ci-cd-pro Goto Github PK
View Code? Open in Web Editor NEWSQL Server unit testing automation example with tSQLt, Docker and GitHub Actions
License: MIT License
SQL Server unit testing automation example with tSQLt, Docker and GitHub Actions
License: MIT License
No response
The following warning was reported in the unit test execution workflow: Node.js 12 actions are deprecated
.
Please update the following actions to use Node.js 16: actions/checkout@v2
.
For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/
A clear and concise description of any alternative solutions or features you've considered
No response
The trigger TR_Product_StockLevel
hasn't been thought to work on multiple rows. The mistake is in the following assignment line:
SELECT
@SafetyStockLevel = SafetyStockLevel
FROM
Inserted;
The local variable named @SafetyStockLevel
can contain only one value from the SELECT
on the Inserted virtual table and this value will be the SafetyStockLevel
value corresponding to the first row that is returned from the statement.
If the first row (that one returned from the query) has a suitable value in the SafetyStockLevel
column, the trigger will consider right the others as well. In this case, not allowed values (lower than 10) from the second row on, will be stored anyway!
Run docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -d AdventureWorks2017 -b < ./unit-test/test-case-try-to-insert-multiple-rows-ordered.sql
(1 rows affected)
.[test try to insert multiple rows ordered] failed: (Failure) Production.usp_Raiserror_SafetyStockLevel_SpyProcedureLog is empty! usp_Raiserror_SafetyStockLevel has not been called!
+----------------------+
|Test Execution Summary|
+----------------------+
|No|Test Case Name |Dur(ms)|Result |
+--+------------------------------------------------------------------------------+-------+-------+
|1 |[UnitTestTRProductSafetyStockLevel].[test try to insert multiple rows ordered]| 28|Failure|
----------------------------------------------------------------------------------------
Msg 50000, Level 16, State 10, Server 759433bb986d, Line 1
Test Case Summary: 1 test case(s) executed, 0 succeeded, 0 skipped, 1 failed, 0 errored.
----------------------------------------------------------------------------------------
Error: Process completed with exit code 1.
No response
A bug happened during the step Restore AdventureWorks
database.
Run docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -Q "RESTORE DATABASE [AdventureWorks2017] FROM DISK = '/adventureworks.bak' WITH MOVE 'AdventureWorks2017' TO '/var/opt/mssql/data/AdventureWorks.mdf', MOVE 'AdventureWorks2017_log' TO '/var/opt/mssql/data/AdventureWorks_log.ldf'"
docker exec -i $ENV_CONTAINER_ID /opt/mssql-tools/bin/sqlcmd -S localhost -U SA -P "3uuiCaKxfbForrK" -Q "RESTORE DATABASE [AdventureWorks2017] FROM DISK = '/adventureworks.bak' WITH MOVE 'AdventureWorks2017' TO '/var/opt/mssql/data/AdventureWorks.mdf', MOVE 'AdventureWorks2017_log' TO '/var/opt/mssql/data/AdventureWorks_log.ldf'"
shell: /usr/bin/bash -e {0}
env:
ENV_CONTAINER_ID: dd67b8f47b706d777cbf1189f249c00fcc2c4462679f34253997a26181e7a82c
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : Login failed for user 'SA'..
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : TCP Provider: Error code 0x2749.
Sqlcmd: Error: Microsoft ODBC Driver 17 for SQL Server : A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online..
Error: Process completed with exit code 1.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.