|
@@ -198,9 +198,9 @@ class RelocationTaskTestCase(TestCase):
|
|
|
fake_message_builder.return_value.send_async.return_value = Mock()
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.preprocessing_scan.delay")
|
|
|
-@region_silo_test
|
|
|
class UploadingCompleteTest(RelocationTaskTestCase):
|
|
|
def test_success(
|
|
|
self,
|
|
@@ -260,13 +260,13 @@ class UploadingCompleteTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_UPLOADING_FAILED
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch(
|
|
|
"sentry.backup.helpers.KeyManagementServiceClient",
|
|
|
new_callable=lambda: FakeKeyManagementServiceClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.preprocessing_baseline_config.delay")
|
|
|
-@region_silo_test
|
|
|
class PreprocessingScanTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -592,13 +592,13 @@ class PreprocessingScanTest(RelocationTaskTestCase):
|
|
|
)
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch(
|
|
|
"sentry.backup.helpers.KeyManagementServiceClient",
|
|
|
new_callable=lambda: FakeKeyManagementServiceClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.preprocessing_colliding_users.delay")
|
|
|
-@region_silo_test
|
|
|
class PreprocessingBaselineConfigTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -702,13 +702,13 @@ class PreprocessingBaselineConfigTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_PREPROCESSING_INTERNAL
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch(
|
|
|
"sentry.backup.helpers.KeyManagementServiceClient",
|
|
|
new_callable=lambda: FakeKeyManagementServiceClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.preprocessing_complete.delay")
|
|
|
-@region_silo_test
|
|
|
class PreprocessingCollidingUsersTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -817,9 +817,9 @@ class PreprocessingCollidingUsersTest(RelocationTaskTestCase):
|
|
|
assert relocation.status == Relocation.Status.FAILURE.value
|
|
|
|
|
|
|
|
|
+@region_silo_test
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.validating_start.delay")
|
|
|
-@region_silo_test
|
|
|
class PreprocessingCompleteTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -947,13 +947,13 @@ class PreprocessingCompleteTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_PREPROCESSING_INTERNAL
|
|
|
|
|
|
|
|
|
+@region_silo_test
|
|
|
@patch(
|
|
|
"sentry.tasks.relocation.CloudBuildClient",
|
|
|
new_callable=lambda: FakeCloudBuildClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.validating_poll.delay")
|
|
|
-@region_silo_test
|
|
|
class ValidatingStartTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -1072,12 +1072,12 @@ class ValidatingStartTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_VALIDATING_MAX_RUNS
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch(
|
|
|
"sentry.tasks.relocation.CloudBuildClient",
|
|
|
new_callable=lambda: FakeCloudBuildClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
-@region_silo_test
|
|
|
class ValidatingPollTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -1290,9 +1290,9 @@ def mock_invalid_finding(storage: Storage, uuid: str):
|
|
|
)
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.importing.delay")
|
|
|
-@region_silo_test
|
|
|
class ValidatingCompleteTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
super().setUp()
|
|
@@ -1431,12 +1431,12 @@ class ValidatingCompleteTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_VALIDATING_INTERNAL
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch(
|
|
|
"sentry.backup.helpers.KeyManagementServiceClient",
|
|
|
new_callable=lambda: FakeKeyManagementServiceClient,
|
|
|
)
|
|
|
@patch("sentry.tasks.relocation.postprocessing.delay")
|
|
|
-@region_silo_test
|
|
|
class ImportingTest(RelocationTaskTestCase, TransactionTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|
|
@@ -1477,9 +1477,9 @@ class ImportingTest(RelocationTaskTestCase, TransactionTestCase):
|
|
|
]
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.notifying_users.delay")
|
|
|
-@region_silo_test
|
|
|
class PostprocessingTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|
|
@@ -1583,9 +1583,9 @@ class PostprocessingTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_POSTPROCESSING_INTERNAL
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.notifying_owner.delay")
|
|
|
-@region_silo_test
|
|
|
class NotifyingUsersTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|
|
@@ -1674,9 +1674,9 @@ class NotifyingUsersTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_NOTIFYING_INTERNAL
|
|
|
|
|
|
|
|
|
+@region_silo_test(stable=True)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
@patch("sentry.tasks.relocation.completed.delay")
|
|
|
-@region_silo_test
|
|
|
class NotifyingOwnerTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|
|
@@ -1767,7 +1767,7 @@ class NotifyingOwnerTest(RelocationTaskTestCase):
|
|
|
assert relocation.failure_reason == ERR_NOTIFYING_INTERNAL
|
|
|
|
|
|
|
|
|
-@region_silo_test
|
|
|
+@region_silo_test(stable=True)
|
|
|
class CompletedTest(RelocationTaskTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|
|
@@ -1784,6 +1784,7 @@ class CompletedTest(RelocationTaskTestCase):
|
|
|
assert not relocation.failure_reason
|
|
|
|
|
|
|
|
|
+@region_silo_test
|
|
|
@patch(
|
|
|
"sentry.backup.helpers.KeyManagementServiceClient",
|
|
|
new_callable=lambda: FakeKeyManagementServiceClient,
|
|
@@ -1793,7 +1794,6 @@ class CompletedTest(RelocationTaskTestCase):
|
|
|
new_callable=lambda: FakeCloudBuildClient,
|
|
|
)
|
|
|
@patch("sentry.utils.relocation.MessageBuilder")
|
|
|
-@region_silo_test
|
|
|
class EndToEndTest(RelocationTaskTestCase, TransactionTestCase):
|
|
|
def setUp(self):
|
|
|
RelocationTaskTestCase.setUp(self)
|