feat(tests): añade TestConnectionStrings y script de creación de DBs de test
Introduce SIGCM2_Test_App y SIGCM2_Test_Api como bases aisladas para Application.Tests y Api.Tests respectivamente. TestConnectionStrings.cs centraliza las connection strings; create-test-api-db.sql documenta el setup idempotente de ambas bases con COLLATE Modern_Spanish_CI_AS.
This commit is contained in:
30
database/init/create-test-api-db.sql
Normal file
30
database/init/create-test-api-db.sql
Normal file
@@ -0,0 +1,30 @@
|
||||
-- create-test-api-db.sql
|
||||
-- Creates test databases for integration tests (idempotent).
|
||||
-- Run once per environment on TECNICA3 before executing integration tests.
|
||||
--
|
||||
-- SIGCM2_Test_App -> used by SIGCM2.Application.Tests
|
||||
-- SIGCM2_Test_Api -> used by SIGCM2.Api.Tests
|
||||
-- SIGCM2_Test -> legacy (kept for old branches e.g. pre-merge CAT-001)
|
||||
--
|
||||
-- After creating the DBs, apply V010 to both new DBs:
|
||||
-- See database/README.md > "Test DBs" section for the PowerShell runbook.
|
||||
|
||||
IF DB_ID(N'SIGCM2_Test_App') IS NULL
|
||||
BEGIN
|
||||
CREATE DATABASE [SIGCM2_Test_App]
|
||||
COLLATE Modern_Spanish_CI_AS;
|
||||
PRINT 'Database SIGCM2_Test_App created.';
|
||||
END
|
||||
ELSE
|
||||
PRINT 'Database SIGCM2_Test_App already exists -- skip.';
|
||||
GO
|
||||
|
||||
IF DB_ID(N'SIGCM2_Test_Api') IS NULL
|
||||
BEGIN
|
||||
CREATE DATABASE [SIGCM2_Test_Api]
|
||||
COLLATE Modern_Spanish_CI_AS;
|
||||
PRINT 'Database SIGCM2_Test_Api created.';
|
||||
END
|
||||
ELSE
|
||||
PRINT 'Database SIGCM2_Test_Api already exists -- skip.';
|
||||
GO
|
||||
Reference in New Issue
Block a user