mirror of
https://github.com/alexhopeoconnor/dnsmasq-webui.git
synced 2026-10-20 12:51:28 +10:00
- ConfigSetCache: no-0x20-encode wins per dnsmasq docs; effective state and source attribution updated - ReadonlyConfigCommandGenerator: use EffectiveConfigWriteSemantics for inverse-pair and key-only-or-value - SpecialOptionValidators for UseStaleCache, AddMac, AddSubnet, Umbrella; wired via RegisterValidatedSingle - OptionSemantics + EffectiveConfigWriteSemantics (GetBehavior/GetInversePairKeys); remove EffectiveConfigWriteBehaviorMap - strip-mac / strip-subnet: full support in EffectiveDnsmasqConfig, sources, cache, sections, field builder, registry, tests - Multi-value editor: toasts and block commit on validation error; 2s toast dedupe - Do0x20 view label comment + Do0x20EncodeDisplayLabelTests - DnsmasqOptionTooltips + extract-option-help.sh for strip-mac/strip-subnet; regenerated option-help HTML
23 lines
835 B
C#
23 lines
835 B
C#
using DnsmasqWebUI.Infrastructure.Helpers.Config;
|
|
|
|
namespace DnsmasqWebUI.Tests;
|
|
|
|
/// <summary>
|
|
/// Ensures effective-config editable options list includes supported cache flags.
|
|
/// </summary>
|
|
public class EffectiveConfigEditableOptionsTests
|
|
{
|
|
/// <summary>
|
|
/// strip-mac and strip-subnet are supported in the effective-config UI and should be listed in cache options.
|
|
/// </summary>
|
|
[Fact]
|
|
public void EditableOptions_Include_StripMac_And_StripSubnet()
|
|
{
|
|
var allOptionNames = EffectiveConfigSections.GetSectionsInOrder()
|
|
.SelectMany(t => EffectiveConfigSections.GetOptionsInSection(t.SectionId))
|
|
.ToHashSet(StringComparer.Ordinal);
|
|
Assert.Contains(DnsmasqConfKeys.StripMac, allOptionNames);
|
|
Assert.Contains(DnsmasqConfKeys.StripSubnet, allOptionNames);
|
|
}
|
|
}
|