Remove unused files in git diff

This commit is contained in:
Erin 2024-01-16 16:02:35 -08:00
parent fe076cf67c
commit 79870a5616
No known key found for this signature in database
GPG key ID: 1CAD275313C62460
5 changed files with 14 additions and 18 deletions

View file

@ -246,16 +246,3 @@ class TestConnectionPool(TestCase):
expected = "InfoDomain failed to execute due to a connection error." expected = "InfoDomain failed to execute due to a connection error."
result = registry.send(commands.InfoDomain(name="test.gov"), cleaned=True) result = registry.send(commands.InfoDomain(name="test.gov"), cleaned=True)
self.assertEqual(result, expected) self.assertEqual(result, expected)
@patch.object(EPPLibWrapper, "_test_registry_connection_success", patch_success)
def test_retries_on_transport_error(self):
"""A .send is invoked on the pool, but transport error occurs and EPP
retries connection."""
with ExitStack() as stack:
stack.enter_context(patch.object(EPPConnectionPool, "_create_socket", self.fake_socket))
stack.enter_context(patch.object(Socket, "connect", self.fake_client))
# Pool should be running
self.assertEqual(registry.pool_status.connection_success, True)
self.assertEqual(registry.pool_status.pool_running, True)

View file

@ -0,0 +1,8 @@
## Purpose
Use this folder for storing files for the migration process. Should otherwise be empty on local dev environments unless necessary. This folder must exist due to the nature of how data is stored on cloud.gov and the nature of the data we want to send.
## How do I migrate registrar data?
This process is detailed in [data_migration.md](../../docs/operations/data_migration.md)
## What kind of files can I store here?
The intent is for PII data or otherwise, but this can exist in any format. Do note that the data contained in this file will be temporary, so after the app is restaged it will lose it. This is ideal for migration files as they write to our DB, but not for something you need to permanently hold onto.

View file

@ -68,9 +68,10 @@ class Command(BaseCommand):
self.domains_with_errors.append(copy.deepcopy(domain.domain_info)) self.domains_with_errors.append(copy.deepcopy(domain.domain_info))
logger.error(f"error retrieving domain {domain.domain_info}: {err}") logger.error(f"error retrieving domain {domain.domain_info}: {err}")
# Inform user how many contacts were disclosed and skipped # Inform user how many contacts were disclosed, skipped, and errored
logger.info("Updated %d contacts to disclosed.", len(self.disclosed_domain_contacts)) logger.info("Updated %d contacts to disclosed.", len(self.disclosed_domain_contacts))
logger.info( logger.info(
"Skipped disclosing %d contacts with security email registrar@dotgov.gov.", "Skipped disclosing %d contacts with security email registrar@dotgov.gov.",
len(self.skipped_domain_contacts), len(self.skipped_domain_contacts)
) )
logger.info("Error disclosing %d contacts.", len(self.domains_with_errors))

View file

@ -1401,8 +1401,8 @@ class Domain(TimeStampedModel, DomainHelper):
DF = epp.DiscloseField DF = epp.DiscloseField
fields = {DF.EMAIL} fields = {DF.EMAIL}
disclose = is_security and contact.email != PublicContact.get_default_security().email disclose = is_security and contact.email != PublicContact.get_default_security().email
# Delete after testing # Delete after testing on other devices
logger.info("Updated domain contact to disclose: %s", disclose) logger.info("Updated domain contact %s to disclose: %s", contact.email, disclose)
# Will only disclose DF.EMAIL if its not the default # Will only disclose DF.EMAIL if its not the default
return epp.Disclose( return epp.Disclose(
flag=disclose, flag=disclose,

View file

@ -561,7 +561,7 @@ class TestRegistrantContacts(MockEppLib):
"registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", # noqa "registrar.management.commands.utility.terminal_helper.TerminalHelper.query_yes_no_exit", # noqa
return_value=True, return_value=True,
): ):
call_command("extend_expiration_dates") call_command("disclose_security_emails")
def test_no_security_email(self): def test_no_security_email(self):
""" """