Skip to content

Add unit test for null condition index #73

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

Merged
merged 1 commit into from
Apr 18, 2025

Conversation

haacked
Copy link
Collaborator

@haacked haacked commented Apr 18, 2025

Just making sure this library will be fine when we fix PostHog/posthog#30569

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

Added test coverage to handle nullable condition indices in feature flag evaluation results, ensuring compatibility with an upcoming PostHog backend change.

  • Added assertion in tests/UnitTests/Json/JsonSerializerHelperTests.cs to verify deserialization of false-flag-2 with null condition index
  • Updated tests/UnitTests/Fixtures/decide-api-result-v4.json to include nullable condition index in test data
  • Inconsistency noted: disabled-flag has non-null condition index (0) despite no_condition_match code

2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings | Greptile

@haacked haacked merged commit 6e8d8c7 into main Apr 18, 2025
4 checks passed
@haacked haacked deleted the haacked/30569-condition-index-nullable branch April 18, 2025 22:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

bug(flags): condition_index should be None (or null) when flag not enabled
2 participants