From ce962990583cb09256cf6c47ee84e9c382c242cd Mon Sep 17 00:00:00 2001 From: Sebastian Holmin Date: Wed, 21 Aug 2024 08:47:32 +0200 Subject: [PATCH] Add reminder to update test on new indicators --- mullvad-types/src/features.rs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/mullvad-types/src/features.rs b/mullvad-types/src/features.rs index e7317ec6a7dc..95caade0f86a 100644 --- a/mullvad-types/src/features.rs +++ b/mullvad-types/src/features.rs @@ -225,11 +225,11 @@ mod tests { expected_indicators ); - // Setting mssfix without having an openVPN endpoint should not result in an indicator settings.tunnel_options.openvpn.mssfix = Some(1300); assert_eq!( compute_feature_indicators(&settings, &endpoint), - expected_indicators + expected_indicators, + "Setting mssfix without having an openVPN endpoint should not result in an indicator" ); endpoint.tunnel_type = TunnelType::OpenVpn; @@ -319,5 +319,24 @@ mod tests { expected_indicators ); } + + // NOTE: If this match statement fails to compile, it means that a new feature indicator has + // been added. Please update this test to include the new feature indicator. + match FeatureIndicator::QuantumResistance { + FeatureIndicator::QuantumResistance => {} + FeatureIndicator::Multihop => {} + FeatureIndicator::BridgeMode => {} + FeatureIndicator::SplitTunneling => {} + FeatureIndicator::LockdownMode => {} + FeatureIndicator::Udp2Tcp => {} + FeatureIndicator::Shadowsocks => {} + FeatureIndicator::LanSharing => {} + FeatureIndicator::DnsContentBlockers => {} + FeatureIndicator::CustomDns => {} + FeatureIndicator::ServerIpOverride => {} + FeatureIndicator::CustomMtu => {} + FeatureIndicator::CustomMssFix => {} + FeatureIndicator::Daita => {} + } } }