Remove MOU bucket, for now

This commit is contained in:
Ryan Ahearn
2022-09-20 13:59:21 -04:00
parent b823c2d04f
commit 7ce9f8cfcb
9 changed files with 28 additions and 73 deletions

View File

@@ -32,9 +32,3 @@ def extract_cloudfoundry_config():
vcap_services['s3'], f"notifications-admin-logo-upload-bucket-{os.environ['DEPLOY_ENV']}")
if bucket_service:
os.environ['LOGO_UPLOAD_BUCKET_NAME'] = bucket_service['credentials']['bucket']
# MOU Upload Bucket Name
bucket_service = find_by_service_name(
vcap_services['s3'], f"notifications-admin-mou-upload-bucket-{os.environ['DEPLOY_ENV']}")
if bucket_service:
os.environ['MOU_UPLOAD_BUCKET_NAME'] = bucket_service['credentials']['bucket']

View File

@@ -59,7 +59,7 @@ class Config(object):
NOTIFY_ENVIRONMENT = 'development'
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-local'
MOU_BUCKET_NAME = 'local-mou'
# MOU_BUCKET_NAME = 'local-mou'
# TRANSIENT_UPLOADED_LETTERS = 'local-transient-uploaded-letters'
ROUTE_SECRET_KEY_1 = os.environ.get('ROUTE_SECRET_KEY_1', 'dev-route-secret-key-1')
ROUTE_SECRET_KEY_2 = os.environ.get('ROUTE_SECRET_KEY_2', 'dev-route-secret-key-2')
@@ -108,7 +108,7 @@ class Development(Config):
CSV_UPLOAD_BUCKET_NAME = 'local-notifications-csv-upload' # created in gsa sandbox
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'local-contact-list' # created in gsa sandbox
LOGO_UPLOAD_BUCKET_NAME = 'local-public-logos-tools' # created in gsa sandbox
MOU_BUCKET_NAME = 'local-notify-tools-mou' # created in gsa sandbox
# MOU_BUCKET_NAME = 'local-notify-tools-mou' # created in gsa sandbox
# TRANSIENT_UPLOADED_LETTERS = 'development-transient-uploaded-letters' # not created in gsa sandbox
# PRECOMPILED_ORIGINALS_BACKUP_LETTERS =
# 'development-letters-precompiled-originals-backup' # not created in sandbox
@@ -135,7 +135,7 @@ class Test(Development):
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'test-contact-list'
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-test'
LOGO_CDN_DOMAIN = 'static-logos.test.com'
MOU_BUCKET_NAME = 'test-mou'
# MOU_BUCKET_NAME = 'test-mou'
# TRANSIENT_UPLOADED_LETTERS = 'test-transient-uploaded-letters'
# PRECOMPILED_ORIGINALS_BACKUP_LETTERS = 'test-letters-precompiled-originals-backup'
NOTIFY_ENVIRONMENT = 'test'
@@ -166,7 +166,7 @@ class Preview(Config):
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'preview-contact-list'
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-preview'
LOGO_CDN_DOMAIN = 'static-logos.notify.works'
MOU_BUCKET_NAME = 'notify.works-mou'
# MOU_BUCKET_NAME = 'notify.works-mou'
# TRANSIENT_UPLOADED_LETTERS = 'preview-transient-uploaded-letters'
# PRECOMPILED_ORIGINALS_BACKUP_LETTERS = 'preview-letters-precompiled-originals-backup'
NOTIFY_ENVIRONMENT = 'preview'
@@ -186,7 +186,7 @@ class Staging(Config):
CONTACT_LIST_UPLOAD_BUCKET_NAME = 'staging-contact-list'
LOGO_UPLOAD_BUCKET_NAME = 'public-logos-staging'
LOGO_CDN_DOMAIN = 'static-logos.staging-notify.works'
MOU_BUCKET_NAME = 'staging-notify.works-mou'
# MOU_BUCKET_NAME = 'staging-notify.works-mou'
# TRANSIENT_UPLOADED_LETTERS = 'staging-transient-uploaded-letters'
# PRECOMPILED_ORIGINALS_BACKUP_LETTERS = 'staging-letters-precompiled-originals-backup'
NOTIFY_ENVIRONMENT = 'staging'
@@ -206,7 +206,8 @@ class Live(Config):
'CONTACT_LIST_BUCKET_NAME', 'notifications-prototype-contact-list-upload') # created in gsa sandbox
LOGO_UPLOAD_BUCKET_NAME = os.environ.get(
'LOGO_UPLOAD_BUCKET_NAME', 'notifications-prototype-logo-upload') # created in gsa sandbox
MOU_BUCKET_NAME = os.environ.get('MOU_UPLOAD_BUCKET_NAME', 'notifications-prototype-mou') # created in gsa sandbox
# MOU_BUCKET_NAME = os.environ.get(
# 'MOU_UPLOAD_BUCKET_NAME', 'notifications-prototype-mou') # created in gsa sandbox
# TRANSIENT_UPLOADED_LETTERS = 'prototype-transient-uploaded-letters' # not created in gsa sandbox
# PRECOMPILED_ORIGINALS_BACKUP_LETTERS = 'prototype-letters-precompiled-originals-backup' # not in sandbox

View File

@@ -21,8 +21,6 @@
{{ current_service.organisation.name }} has already accepted the US
Notify data sharing and financial agreement.
</p>
<p class="govuk-body">For more information, you can <a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.service_download_agreement', service_id=current_service.id) }}">download a copy of the agreement (PDF)</a>.
</p>
<p class="govuk-body">
The agreement is confidential and should not be shared outside your organisation.
</p>

View File

@@ -27,9 +27,6 @@
<p class="govuk-body">
Once accepted, the agreement covers all Notify services from {{ current_service.organisation.name }}.
</p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state" href="{{ url_for('main.service_download_agreement', service_id=current_service.id) }}">Download a copy of the data sharing and financial agreement (PDF)</a>.
</p>
<p class="govuk-body">
The agreement is confidential and should not be shared outside your organisation.
</p>

View File

@@ -22,20 +22,10 @@
{{ current_org.agreement_signed_on_behalf_of_name or current_org.agreement_signed_by.name }} signed the agreement
on behalf of {{ current_org.name}}.
</p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state"
href="{{ url_for('.organisation_download_agreement', org_id=current_org.id) }}">Download the current version of the agreement (PDF)
</a>
</p>
{% elif current_org.agreement_signed %}
<p class="govuk-body">
{{ current_org.name}} has accepted the US Notify data sharing and financial agreement.
</p>
<p class="govuk-body">
<a class="govuk-link govuk-link--no-visited-state"
href="{{ url_for('.organisation_download_agreement', org_id=current_org.id) }}">Download the current version of the agreement (PDF)
</a>
</p>
{% elif current_org.agreement_signed is false %}
<p class="govuk-body">
{{ current_org.name}} needs to accept the US Notify data sharing and financial agreement.

View File

@@ -17,7 +17,6 @@ applications:
- notifications-api-csv-upload-bucket-((env))
- notifications-api-contact-list-bucket-((env))
- notifications-admin-logo-upload-bucket-((env))
- notifications-admin-mou-upload-bucket-((env))
env:
NOTIFY_APP_NAME: admin

View File

@@ -29,14 +29,3 @@ module "logo_upload_bucket" {
recursive_delete = local.recursive_delete
s3_service_name = "${local.app_name}-logo-upload-bucket-${local.env}"
}
module "mou_upload_bucket" {
source = "github.com/18f/terraform-cloudgov//s3"
cf_user = var.cf_user
cf_password = var.cf_password
cf_org_name = local.cf_org_name
cf_space_name = local.cf_space_name
recursive_delete = local.recursive_delete
s3_service_name = "${local.app_name}-mou-upload-bucket-${local.env}"
}

View File

@@ -1669,7 +1669,7 @@ def test_organisation_billing_page_when_the_agreement_is_signed_by_a_known_perso
assert '2.5 of the US Notify data sharing and financial agreement on 20 February 2020' in normalize_spaces(
page.text)
assert f'{expected_signatory} signed' in page.text
assert page.select_one('main a')['href'] == url_for('.organisation_download_agreement', org_id=ORGANISATION_ID)
# assert page.select_one('main a')['href'] == url_for('.organisation_download_agreement', org_id=ORGANISATION_ID)
def test_organisation_billing_page_when_the_agreement_is_signed_by_an_unknown_person(
@@ -1690,7 +1690,7 @@ def test_organisation_billing_page_when_the_agreement_is_signed_by_an_unknown_pe
assert page.h1.string == 'Billing'
assert (f'{organisation_one["name"]} has accepted the US Notify data '
'sharing and financial agreement.') in page.text
assert page.select_one('main a')['href'] == url_for('.organisation_download_agreement', org_id=ORGANISATION_ID)
# assert page.select_one('main a')['href'] == url_for('.organisation_download_agreement', org_id=ORGANISATION_ID)
@pytest.mark.parametrize('agreement_signed, expected_content', [
@@ -1719,14 +1719,14 @@ def test_organisation_billing_page_when_the_agreement_is_not_signed(
@pytest.mark.parametrize('crown, expected_status, expected_file_fetched, expected_file_served', (
(
True, 200, 'crown.pdf',
'US Notify data sharing and financial agreement.pdf',
),
(
False, 200, 'non-crown.pdf',
'US Notify data sharing and financial agreement (non-crown).pdf',
),
# (
# True, 200, 'crown.pdf',
# 'US Notify data sharing and financial agreement.pdf',
# ),
# (
# False, 200, 'non-crown.pdf',
# 'US Notify data sharing and financial agreement (non-crown).pdf',
# ),
(
None, 404, None,
None,

View File

@@ -23,21 +23,12 @@ class MockS3Object():
(
True, True,
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
[
(
['govuk-link', 'govuk-link--no-visited-state'],
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
),
]
[]
),
(
False, False,
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
[
(
['govuk-link', 'govuk-link--no-visited-state'],
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
),
(
['govuk-button'],
partial(url_for, 'main.service_accept_agreement', service_id=SERVICE_ONE_ID),
@@ -48,10 +39,6 @@ class MockS3Object():
False, True,
partial(url_for, 'main.request_to_go_live', service_id=SERVICE_ONE_ID),
[
(
['govuk-link', 'govuk-link--no-visited-state'],
partial(url_for, 'main.service_download_agreement', service_id=SERVICE_ONE_ID),
),
(
['govuk-button'],
partial(url_for, 'main.service_accept_agreement', service_id=SERVICE_ONE_ID),
@@ -126,14 +113,14 @@ def test_unknown_gps_and_trusts_are_redirected(
@pytest.mark.parametrize('crown, expected_status, expected_file_fetched, expected_file_served', (
(
True, 200, 'crown.pdf',
'US Notify data sharing and financial agreement.pdf',
),
(
False, 200, 'non-crown.pdf',
'US Notify data sharing and financial agreement (non-crown).pdf',
),
# (
# True, 200, 'crown.pdf',
# 'US Notify data sharing and financial agreement.pdf',
# ),
# (
# False, 200, 'non-crown.pdf',
# 'US Notify data sharing and financial agreement (non-crown).pdf',
# ),
(
None, 404, None,
None,
@@ -490,8 +477,8 @@ def test_confirm_agreement_page_persists(
'main.public_download_agreement',
))
@pytest.mark.parametrize('variant, expected_status', (
('crown', 200),
('non-crown', 200),
# ('crown', 200),
# ('non-crown', 200),
('foo', 404),
))
def test_show_public_agreement_page(