Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ internal static ConnectionProviderOptions BuildConnectionProviderOptions()
ValueType = ConnectionOption.ValueTypePassword,
SpecialValueType = ConnectionOption.SpecialValuePasswordName,
IsIdentity = true,
IsRequired = true,
IsRequired = false,
GroupName = GroupNames.General,
},
new ConnectionOption
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,5 +334,20 @@ public void ConnectionSettingsComparableShouldConsiderAdvancedOptions()
details1 = details2.Clone();
Assert.That(details1.IsComparableTo(details2), Is.True, "Same Connection Settings must be comparable.");
}

/// <summary>
/// Verify that the password connection option is not required.
/// SQL Server supports connections with empty passwords, so the password field should not be marked as required.
/// </summary>
[Test]
public void PasswordConnectionOptionShouldNotBeRequired()
{
ConnectionProviderOptions optionMetadata = ConnectionProviderOptionsHelper.BuildConnectionProviderOptions();

var passwordOption = optionMetadata.Options.FirstOrDefault(o => o.Name == "password");

Assert.That(passwordOption, Is.Not.Null, "Password option should exist in connection provider options");
Assert.That(passwordOption.IsRequired, Is.False, "Password option should not be required since SQL Server supports empty password connections");
}
}
}