Open source, privacy-first web analytics. Lightweight, cookie-free Google Analytics alternative. Self-hosted or cloud.
TypeScript analyticsanalytics-dashboardclickhouseelixirgoogle-analyticsmarketingopen-source-analyticsphoenixplausible-analyticspostgresqlprivacyprivacy-friendlyself-hostedsimple-analyticsstatisticstailwindcssweb-analyticswebsite-analyticswebsite-statswebsite-tracking
Run full test suite against `read_team_schemas` FF on CI (#4763)
Adrian Gruntkowski5d9e94770d96
diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.ymlindex ad04573915..30f2b3295d 100644--- a/.github/workflows/elixir.yml+++ b/.github/workflows/elixir.yml@@ -16,25 +16,25 @@ env:jobs:build:- name: "Build and test (${{ matrix.mix_env }}, ${{ matrix.postgres_image }}${{ matrix.test_experimental_reduced_joins == '1' && ', experimental_reduced_joins' || '' }})"+ name: "Build and test (${{ matrix.mix_env }}, ${{ matrix.postgres_image }}${{ matrix.test_read_team_schemas_and_experimental_reduced_joins == '1' && ', read_team_schemas_and_experimental_reduced_joins' || '' }})"runs-on: ubuntu-lateststrategy:matrix:mix_env: ["test", "ce_test"]postgres_image: ["postgres:16"]- test_experimental_reduced_joins: ["0"]+ test_read_team_schemas_and_experimental_reduced_joins: ["0"]include:- mix_env: "test"postgres_image: "postgres:15"- test_experimental_reduced_joins: "0"+ test_read_team_schemas_and_experimental_reduced_joins: "0"- mix_env: "test"postgres_image: "postgres:16"- test_experimental_reduced_joins: "1"+ test_read_team_schemas_and_experimental_reduced_joins: "1"env:MIX_ENV: ${{ matrix.mix_env }}- TEST_EXPERIMENTAL_REDUCED_JOINS: ${{ matrix.test_experimental_reduced_joins }}+ TEST_READ_TEAM_SCHEMAS_AND_EXPERIMENTAL_REDUCED_JOINS: ${{ matrix.test_read_team_schemas_and_experimental_reduced_joins }}services:postgres:image: ${{ matrix.postgres_image }}diff --git a/test/plausible_web/live/sites_test.exs b/test/plausible_web/live/sites_test.exsindex 6e29cb7839..61c1af0443 100644--- a/test/plausible_web/live/sites_test.exs+++ b/test/plausible_web/live/sites_test.exs@@ -16,6 +16,22 @@ defmodule PlausibleWeb.Live.SitesTest doassert text(html) =~ "You don't have any sites yet"end+ test "renders metadata for invitation", %{+ conn: conn,+ user: user+ } do+ inviter = new_user()+ site = new_site(owner: inviter)++ invitation = invite_guest(site, user, inviter: inviter, role: :viewer)++ {:ok, _lv, html} = live(conn, "/sites")++ invitation_data = get_invitation_data(html)++ assert get_in(invitation_data, ["invitations", invitation.invitation_id, "invitation"])+ end+@tag :ee_onlytest "renders ownership transfer invitation for a case with no plan", %{conn: conn,diff --git a/test/support/teams/test.ex b/test/support/teams/test.exindex 93fd3b8994..f1f2b8fa7a 100644--- a/test/support/teams/test.ex+++ b/test/support/teams/test.ex@@ -78,7 +78,13 @@ defmodule Plausible.Teams.Test do)team_invitation =- insert(:team_invitation, team: team, email: email, inviter: inviter, role: :guest)+ insert(:team_invitation,+ invitation_id: old_model_invitation.invitation_id,+ team: team,+ email: email,+ inviter: inviter,+ role: :guest+ )insert(:guest_invitation, team_invitation: team_invitation, site: site, role: role)diff --git a/test/test_helper.exs b/test/test_helper.exsindex 53956b8a9a..d405644c56 100644--- a/test/test_helper.exs+++ b/test/test_helper.exs@@ -6,15 +6,16 @@ endMox.defmock(Plausible.HTTPClient.Mock, for: Plausible.HTTPClient.Interface)Application.ensure_all_started(:double)-# Temporary flag to test `experimental_reduced_joins` flag on all tests.-if System.get_env("TEST_EXPERIMENTAL_REDUCED_JOINS") == "1" do+# Temporary flag to test `read_team_schemas` and `experimental_reduced_joins`+# flags on all tests.+if System.get_env("TEST_READ_TEAM_SCHEMAS_AND_EXPERIMENTAL_REDUCED_JOINS") == "1" do+ FunWithFlags.enable(:read_team_schemas)FunWithFlags.enable(:experimental_reduced_joins)else+ FunWithFlags.disable(:read_team_schemas)FunWithFlags.disable(:experimental_reduced_joins)end-FunWithFlags.enable(:read_team_schemas)-Ecto.Adapters.SQL.Sandbox.mode(Plausible.Repo, :manual)# warn about minio if it's included in tests but not running