-
Notifications
You must be signed in to change notification settings - Fork 349
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add feature indicator test #6648
Conversation
318d41e
to
c4c4c54
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice! If we could fail the test when a new feature indicator (which is not yet covered by this test) is added, do you think that would add additional value? 😊
Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Serock3)
mullvad-types/src/features.rs
line 230 at r1 (raw file):
compute_feature_indicators(&settings, &endpoint), expected_indicators );
Is the intent to enable ad-blocking DNS twice?:)
Code quote:
settings
.tunnel_options
.dns_options
.default_options
.block_ads = true;
expected_indicators
.0
.insert(FeatureIndicator::DnsContentBlockers);
assert_eq!(
compute_feature_indicators(&settings, &endpoint),
expected_indicators
);
settings
.tunnel_options
.dns_options
.default_options
.block_ads = true;
expected_indicators
.0
.insert(FeatureIndicator::DnsContentBlockers);
assert_eq!(
compute_feature_indicators(&settings, &endpoint),
expected_indicators
);
c4c4c54
to
260fd26
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done
Reviewable status: 1 of 2 files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)
mullvad-types/src/features.rs
line 230 at r1 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Is the intent to enable ad-blocking DNS twice?:)
Whoops
260fd26
to
883fa76
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Serock3)
mullvad-types/src/features.rs
line 324 at r2 (raw file):
// !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.
Nit Why the leading bang (!
)? 😊
Code quote:
// !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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)
mullvad-types/src/features.rs
line 324 at r2 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Nit Why the leading bang (
!
)? 😊
It's because my IDE makes the entire comment red 🙈 Not sure if that's some unofficial standard, but it made it stick out a lot more for me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @MarkusPettersson98)
mullvad-types/src/features.rs
line 324 at r2 (raw file):
Previously, Serock3 (Sebastian Holmin) wrote…
It's because my IDE makes the entire comment red 🙈 Not sure if that's some unofficial standard, but it made it stick out a lot more for me
A bit silly sure, I can remove it if you want
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @Serock3)
mullvad-types/src/features.rs
line 324 at r2 (raw file):
Previously, Serock3 (Sebastian Holmin) wrote…
A bit silly sure, I can remove it if you want
Oh, maybe. I've never seen it used before 🤔 For that purpose there is the NOTE:
convention* which is failry widespread. I would prefer that one, since my editor doesn't pick up the // !..
-formatting 😊
883fa76
to
ce96299
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 1 of 2 files reviewed, all discussions resolved (waiting on @MarkusPettersson98)
mullvad-types/src/features.rs
line 324 at r2 (raw file):
Previously, MarkusPettersson98 (Markus Pettersson) wrote…
Oh, maybe. I've never seen it used before 🤔 For that purpose there is the
NOTE:
convention* which is failry widespread. I would prefer that one, since my editor doesn't pick up the// !..
-formatting 😊
I agree that NOTE:
is more widespread, switched to that
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r3, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved
ce96299
to
e2c7d16
Compare
Add simple test that modifies the settings and endpoint with one variable at a time and verifies that the corresponding indicator is activated.
Fixes: DES-1159
This change is