mirror of
https://github.com/ckaczor/sqltoolsservice.git
synced 2026-01-27 17:24:26 -05:00
Changes to sqltoolsservice to allow empty password for SqlLogin (#333)
* Initial changes to allow empty passwords * Added in empty password test * Modifying test to work after my changes.
This commit is contained in:
@@ -91,9 +91,9 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Credentials
|
||||
|
||||
await service.HandleSaveCredentialRequest(new Credential(CredentialId), contextMock.Object);
|
||||
TestUtils.VerifyErrorSent(contextMock);
|
||||
Assert.Contains("ArgumentException", errorResponse);
|
||||
Assert.True(errorResponse.Contains("ArgumentException") || errorResponse.Contains("ArgumentNullException"));
|
||||
}
|
||||
|
||||
|
||||
[Fact]
|
||||
public async Task SaveCredentialWorksForSingleCredential()
|
||||
{
|
||||
@@ -102,6 +102,14 @@ namespace Microsoft.SqlTools.ServiceLayer.UnitTests.Credentials
|
||||
verify: Assert.True);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SaveCredentialWorksForEmptyPassword()
|
||||
{
|
||||
await TestUtils.RunAndVerify<bool>(
|
||||
test: (requestContext) => service.HandleSaveCredentialRequest(new Credential(CredentialId, ""), requestContext),
|
||||
verify: Assert.True);
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public async Task SaveCredentialSupportsSavingCredentialMultipleTimes()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user