فینورا پرو - سامانه جامع حسابداری و صدور فاکتور

test(a02): pinpoint synthetic LocalDB connection constructor failure without leaking SQL

davoodmehraban89 committed Oct 30, 2026 at 19:38 UTC 13c8f04799d3f2fb29144a4f6f3ed6743225258a
1 file changed +14 -3
scripts/a02-synthetic-sql-localdb-restore-smoke.ps1
+14 -3
@@ -53,12 +53,23 @@ try{
53 $phase='start-instance'
54 & $localdb start $instance | Out-Null
55 Require ($LASTEXITCODE -eq 0) 'A02_LOCALDB_START_FAILED'
56 - $phase='connect-master'
56 + $phase='connection-string-build'
57 $b=[System.Data.SqlClient.SqlConnectionStringBuilder]::new()
58 + $phase='connection-string-datasource'
59 $b.DataSource='(localdb)\'+$instance
59 - $b.InitialCatalog='master';$b.IntegratedSecurity=$true
60 - $b.ConnectTimeout=30;$b.Encrypt=$false;$b.Pooling=$false
60 + $phase='connection-string-catalog'
61 + $b.InitialCatalog='master'
62 + $phase='connection-string-security'
63 + $b.IntegratedSecurity=$true
64 + $phase='connection-string-timeout'
65 + $b.ConnectTimeout=30
66 + $phase='connection-string-encryption'
67 + $b.Encrypt=$false
68 + $phase='connection-string-pooling'
69 + $b.Pooling=$false
70 + $phase='connection-object'
71 $conn=[System.Data.SqlClient.SqlConnection]::new($b.ToString())
72 + $phase='connection-open'
73 $conn.Open()
74 $phase='create-synthetic-database'
75 ExecSql $conn ('CREATE DATABASE ['+$source+'];')