mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-04 02:11:11 -05:00
Change services.id to a UUID
Ideally all the primary keys in the db would be UUID in order to guarantee unique ids across distributed dbs. This updates the services.id to a UUID. All the tables with a foreign key to the services.id are also updated. The endpoints no longer state a data type of the <service_id> path param. All the tests are updated to reflect this update. The thing to pay attention to is the 0011_uuid_service_id.py migration script. This commit must go with a commit on the notifications_admin app to keep things working. There will be a small outage until both deploys have happened.
This commit is contained in:
@@ -82,7 +82,7 @@ def test_post_job(notify_api, notify_db, notify_db_session, sample_template):
|
||||
file_name = '{}.csv'.format(job_id)
|
||||
data = {
|
||||
'id': str(job_id),
|
||||
'service': service_id,
|
||||
'service': str(service_id),
|
||||
'template': template_id,
|
||||
'original_file_name': original_file_name,
|
||||
'bucket_name': bucket_name,
|
||||
@@ -105,7 +105,7 @@ def test_post_job(notify_api, notify_db, notify_db_session, sample_template):
|
||||
resp_json = json.loads(response.get_data(as_text=True))
|
||||
|
||||
assert resp_json['data']['id'] == str(job_id)
|
||||
assert resp_json['data']['service'] == service_id
|
||||
assert resp_json['data']['service'] == str(service_id)
|
||||
assert resp_json['data']['template'] == template_id
|
||||
assert resp_json['data']['original_file_name'] == original_file_name
|
||||
|
||||
|
||||
Reference in New Issue
Block a user