Skip to content

Commit 09ad2f2

Browse files
committed
User Story 38481: Fix unique db object name issues
- Removed new test that requires other classes not brought over in the cherry-pick.
1 parent 5459c4b commit 09ad2f2

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

src/Microsoft.Data.SqlClient/tests/ManualTests/AlwaysEncrypted/CspProviderExt.cs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -157,57 +157,6 @@ public void TestRoundTripWithCSPAndCertStoreProvider()
157157
}
158158
}
159159

160-
[ConditionalTheory(typeof(DataTestUtility), nameof(DataTestUtility.AreConnStringSetupForAE))]
161-
[ClassData(typeof(AEConnectionStringProvider))]
162-
public void TestEncryptDecryptWithCSP(string connectionString)
163-
{
164-
string providerName = @"Microsoft Enhanced RSA and AES Cryptographic Provider";
165-
string keyIdentifier = DataTestUtility.GetLongName("CSP");
166-
CspParameters namedCspParameters = new CspParameters(providerType, providerName, keyIdentifier);
167-
using SQLSetupStrategyCspProvider sqlSetupStrategyCsp = new SQLSetupStrategyCspProvider(namedCspParameters);
168-
169-
try
170-
{
171-
CertificateUtilityWin.RSAPersistKeyInCsp(providerName, keyIdentifier);
172-
string cspPath = String.Concat(providerName, @"/", keyIdentifier);
173-
174-
SQLSetupStrategyCspExt sqlSetupStrategyCsp = new SQLSetupStrategyCspExt(cspPath);
175-
string tableName = sqlSetupStrategyCsp.CspProviderTable.Name;
176-
177-
try
178-
{
179-
using SqlConnection sqlConn = new(connectionString);
180-
sqlConn.Open();
181-
182-
Table.DeleteData(tableName, sqlConn);
183-
184-
// insert 1 row data
185-
Customer customer = new Customer(45, "Microsoft", "Corporation");
186-
187-
DatabaseHelper.InsertCustomerData(sqlConn, null, tableName, customer);
188-
189-
// Test INPUT parameter on an encrypted parameter
190-
using SqlCommand sqlCommand = new(@$"SELECT CustomerId, FirstName, LastName FROM [{tableName}] WHERE FirstName = @firstName",
191-
sqlConn, null, SqlCommandColumnEncryptionSetting.Enabled);
192-
SqlParameter customerFirstParam = sqlCommand.Parameters.AddWithValue(@"firstName", @"Microsoft");
193-
Console.WriteLine(@"Exception: {0}");
194-
customerFirstParam.Direction = System.Data.ParameterDirection.Input;
195-
196-
using SqlDataReader sqlDataReader = sqlCommand.ExecuteReader();
197-
ValidateResultSet(sqlDataReader);
198-
}
199-
finally
200-
{
201-
// clean up database resources
202-
sqlSetupStrategyCsp.Dispose();
203-
}
204-
}
205-
finally
206-
{
207-
CertificateUtilityWin.RSADeleteKeyInCsp(providerName, keyIdentifier);
208-
}
209-
}
210-
211160
/// <summary>
212161
/// Validates that the results are the ones expected.
213162
/// </summary>

0 commit comments

Comments
 (0)