Skip to content
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

chore(flags): Add some tests for flag matching #26145

Closed
wants to merge 1 commit into from

Conversation

danielbachhuber
Copy link
Contributor

Changes

Adds some tests for flag matching behavior in support of PostHog/posthog-js#1519

How did you test this code?

CI should pass.

from posthog.test.base import BaseTest


class TestFlagMatching(BaseTest):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

flyby, you should instead copy these tests into posthog-js: https://github.com/PostHog/posthog/blob/master/rust/feature-flags/tests/test_flag_matching_consistency.rs#L12

All SDKs have these tests, so you'd also find the js version already written in posthog-js-lite - this ensures the hashing is consistent across SDKs doing local evaluation.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(or, well, these can be in addition to the above^ if you're trying to check something different here :)

@posthog-bot
Copy link
Contributor

This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, post a comment or remove the stale label – otherwise this will be closed in another week. If you want to permanentely keep it open, use the waiting label.

@danielbachhuber
Copy link
Contributor Author

Punting on this for now, see PostHog/posthog-js#1519 (comment)

@danielbachhuber danielbachhuber deleted the flags/hash-tests branch November 22, 2024 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants