0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-24 09:14:46 +01:00
posthog/rust/feature-flags
Dylan Martin c940fd5229
feat(flags): rust implementation of a bunch of things (#24957)
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2024-09-24 19:06:22 -04:00
..
src feat(flags): rust implementation of a bunch of things (#24957) 2024-09-24 19:06:22 -04:00
tests feat(flags): rust implementation of a bunch of things (#24957) 2024-09-24 19:06:22 -04:00
Cargo.toml feat(flags): rust implementation of a bunch of things (#24957) 2024-09-24 19:06:22 -04:00
README.md

Testing

First, make sure docker compose is running (from main posthog repo), and test database exists:

docker compose -f ../docker-compose.dev.yml up -d
TEST=1 python manage.py setup_test_environment --only-postgres

We only need to run the above once, when the test database is created.

TODO: Would be nice to make the above automatic.

Then, run the tests:

cargo test --package feature-flags

To watch changes

brew install cargo-watch

and then run:

cargo watch -x test --package feature-flags

To run a specific test:

cargo watch -x "test --package feature-flags --lib -- property_matching::tests::test_match_properties_math_operators --exact --show-output"

Running

RUST_LOG=debug cargo run --bin feature-flags

Format code

cargo fmt --package feature-flags