|
@@ -100,7 +100,7 @@ def no_internal_networks(monkeypatch):
|
|
|
monkeypatch.setattr("sentry.auth.system.INTERNAL_NETWORKS", ())
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_internal_relays_should_receive_minimal_configs_if_they_do_not_explicitly_ask_for_full_config(
|
|
|
call_endpoint, default_project, default_projectkey
|
|
|
):
|
|
@@ -117,7 +117,7 @@ def test_internal_relays_should_receive_minimal_configs_if_they_do_not_explicitl
|
|
|
assert safe.get_path(cfg, "config", "groupingConfig") is None
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_internal_relays_should_receive_full_configs(
|
|
|
call_endpoint, default_project, default_projectkey
|
|
|
):
|
|
@@ -164,7 +164,7 @@ def test_internal_relays_should_receive_full_configs(
|
|
|
)
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relays_dyamic_sampling(
|
|
|
client, call_endpoint, default_project, default_projectkey, dyn_sampling_data
|
|
|
):
|
|
@@ -188,7 +188,7 @@ def test_relays_dyamic_sampling(
|
|
|
assert dynamic_sampling == {"rules": [], "rulesV2": []}
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_trusted_external_relays_should_not_be_able_to_request_full_configs(
|
|
|
add_org_key, call_endpoint, no_internal_networks
|
|
|
):
|
|
@@ -196,7 +196,7 @@ def test_trusted_external_relays_should_not_be_able_to_request_full_configs(
|
|
|
assert status_code == 403
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_when_not_sending_full_config_info_into_a_internal_relay_a_restricted_config_is_returned(
|
|
|
call_endpoint, default_project, default_projectkey
|
|
|
):
|
|
@@ -209,7 +209,7 @@ def test_when_not_sending_full_config_info_into_a_internal_relay_a_restricted_co
|
|
|
assert safe.get_path(cfg, "config", "groupingConfig") is None
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_when_not_sending_full_config_info_into_an_external_relay_a_restricted_config_is_returned(
|
|
|
call_endpoint, add_org_key, relay, default_project, default_projectkey
|
|
|
):
|
|
@@ -225,7 +225,7 @@ def test_when_not_sending_full_config_info_into_an_external_relay_a_restricted_c
|
|
|
assert safe.get_path(cfg, "config", "groupingConfig") is None
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_trusted_external_relays_should_receive_minimal_configs(
|
|
|
relay, add_org_key, call_endpoint, default_project, default_projectkey
|
|
|
):
|
|
@@ -263,7 +263,7 @@ def test_trusted_external_relays_should_receive_minimal_configs(
|
|
|
assert safe.get_path(cfg, "config", "quotas") is None
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_untrusted_external_relays_should_not_receive_configs(
|
|
|
call_endpoint, default_project, default_projectkey, no_internal_networks
|
|
|
):
|
|
@@ -283,7 +283,7 @@ def projectconfig_cache_set(monkeypatch):
|
|
|
return calls
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relay_projectconfig_cache_minimal_config(
|
|
|
call_endpoint, default_project, projectconfig_cache_set, task_runner
|
|
|
):
|
|
@@ -298,7 +298,7 @@ def test_relay_projectconfig_cache_minimal_config(
|
|
|
assert not projectconfig_cache_set
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relay_projectconfig_cache_full_config(
|
|
|
call_endpoint, default_projectkey, projectconfig_cache_set, task_runner
|
|
|
):
|
|
@@ -323,7 +323,7 @@ def test_relay_projectconfig_cache_full_config(
|
|
|
assert redis_cfg == http_cfg
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relay_nonexistent_project(call_endpoint, projectconfig_cache_set, task_runner):
|
|
|
wrong_public_key = ProjectKey.generate_api_key()
|
|
|
|
|
@@ -336,7 +336,7 @@ def test_relay_nonexistent_project(call_endpoint, projectconfig_cache_set, task_
|
|
|
assert projectconfig_cache_set == [{str(wrong_public_key): result["configs"][wrong_public_key]}]
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relay_disabled_project(
|
|
|
call_endpoint, default_project, projectconfig_cache_set, task_runner
|
|
|
):
|
|
@@ -353,7 +353,7 @@ def test_relay_disabled_project(
|
|
|
assert projectconfig_cache_set == [{str(wrong_public_key): result["configs"][wrong_public_key]}]
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
def test_relay_disabled_key(
|
|
|
call_endpoint, default_project, projectconfig_cache_set, task_runner, default_projectkey
|
|
|
):
|
|
@@ -369,7 +369,7 @@ def test_relay_disabled_key(
|
|
|
assert projectconfig_cache_set == [{str(default_projectkey.public_key): http_cfg}]
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
@pytest.mark.parametrize("drop_sessions", [False, True])
|
|
|
def test_session_metrics_extraction(call_endpoint, task_runner, drop_sessions):
|
|
|
with Feature({"organizations:metrics-extraction": True}), Feature(
|
|
@@ -384,7 +384,7 @@ def test_session_metrics_extraction(call_endpoint, task_runner, drop_sessions):
|
|
|
assert config["sessionMetrics"] == {"version": 1, "drop": drop_sessions}
|
|
|
|
|
|
|
|
|
-@pytest.mark.django_db
|
|
|
+@pytest.mark.django_db(databases="__all__")
|
|
|
@pytest.mark.parametrize("abnormal_mechanism_rollout", [0, 1])
|
|
|
def test_session_metrics_abnormal_mechanism_tag_extraction(
|
|
|
call_endpoint, task_runner, set_sentry_option, abnormal_mechanism_rollout
|