0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-22 08:40:03 +01:00
Commit Graph

10 Commits

Author SHA1 Message Date
Karl-Aksel Puulmann
b33347205c
fix: Revert "chore(tests): add pytest-randomly plugin to randomize test run order" (#12335)
* Revert "chore(tests): add pytest-randomly plugin to randomize test run order (#12307)"

This reverts commit 313de83cb8.

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-19 13:30:16 +03:00
Ben White
683a4aab1a
fix: Check for active subscription to determine billing version (#12330) 2022-10-19 10:28:26 +00:00
zackelan
313de83cb8
chore(tests): add pytest-randomly plugin to randomize test run order (#12307)
* chore(tests): add pytest-randomly plugin to randomize test run order

* Update snapshots

* Update snapshots

* Update snapshots

Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-10-18 09:34:34 -07:00
Yakko Majuri
4f41076aca
chore: split out async migrations ci (#9539)
* chore: split out async migrations ci

* update

* mark test correctly

* remove if from runner
2022-04-26 17:58:30 +01:00
Paolo D'Amico
655c1ce9a4
refactor(enteprise): Removes conditional SAML dependencies (#8952) 2022-03-10 07:14:30 -06:00
Paolo D'Amico
5ac9ecd985
Track invite signups (#8446)
Co-authored-by: Michael Matloka <dev@twixes.com>
2022-02-08 15:37:07 +01:00
Paul D'Ambra
50b12d9bb7
Set debug, test, and primary_db env variables based on context (#7250)
* set debug, test, and primary_db env variables based on context

* remove unnecessary print

* also use pytest.ini for some tests run straight from pytest at the CLI
2021-11-20 17:18:39 +00:00
Harry Waye
9887856c33
Implementation of diagnose event names (#6235)
* chore(diagnose): add a stub endpoint for event diagnosis

This adds an insight endpoint that takes a `target_entity` and returns
a list of events ordered by significance of a person reaching
`target_entity`

Followup PRs will add actual calculations but this should act as a
conversation piece around the structure of request and response, as well
as a stub from which UI development can start.

* play around to get mypy typings right

* Sort out test reponse structurea

* refactor: address CR comments

* feat(diagnose): add diagnose stubs for implementation

* feat(funnel): add event correlation calculation implementation

This adds to the `/api/projects/<team_id>/funnel/correlation` endpoint
an implementation that calculates the odds_ratios for each event that a
user that has been part of a funnel, successful or otherwise.

* chore(correlation): get query working

* refactor(correlation): move functions to Query methods
2021-10-06 11:08:16 +01:00
Harry Waye
c23704b390
fix(event-search): make search case insensitive for postgres (#5880)
* chore(dev): make sure we reuse the postgres db in tests

This can be overridden with `--create-db`, see https://pytest-django.readthedocs.io/en/latest/database.html#example-work-flow-with-reuse-db-and-create-db

* refactor(test_event_definition): remove requirement for demo data team

The data takes a long time to import and is a little indirect. Removed
and replaced with some simple db creates

* fix(event-search): make search case insensitive for postgres

It already is for clickhouse which is using ILIKE.

One thing I'm not sure about is why we'd not use postgres tsv here
instead of doing our own tokenising etc. Still may be relevant for data
that we wish to keep in postgres.

Closes https://github.com/PostHog/posthog/issues/5812

Co-authored-by: Harry Waye <harry@scalexp.com>
Co-authored-by: eric <eeoneric@gmail.com>
2021-09-09 13:57:34 -04:00
Karl-Aksel Puulmann
24de8b55e4
Run tests via pytest (#3417)
* Compile requirements-dev.txt with latest pip-tools

* Install pytest

* Avoid picking up factories as tests

* New runner

* Always set TEST env variable running tests

Some of our tests rely on it.

* Remove repetition

* Fix a broken test

* Cut down noise from bin/tests

* Rename test factory

* Fix stickiness filter

* Skip a broken test

This has been broken since numpy removal PR. Sadly tests were not
running for this submodule

* Fix import on ee

* Run ee tests properly

The django_db_setup fixture will be automatically run when running ee/
module tests.

* Make tests run on CI

* Include REDIS_URL, fix cloud

* Set TEST env variable

* Hack cloud tests to work

* Attempt at workflow fix

* Import Person model when running ee tests

This module implicitly adds hooks, so this is needed when running tests

* Respect reuse-db for clickhouse

* Add custom markers to avoid warnings

* pytest: use ch test database always

Accidentally wiped by ch setup a few times without this. Oops

* Remove repetition in tests

* Pytest: Always run migrations

Testing a state cleanup fix

* Use same DB in conftest and main code

* Pytest: autoset TEST setting without env variable

* fix broken test

Co-authored-by: eric <eeoneric@gmail.com>
2021-02-24 09:32:44 +02:00