Commit Graph

61 Commits

Author SHA1 Message Date
Kenneth Kehl
851ce236e3 more s3 tests 2024-10-28 12:08:48 -07:00
Kenneth Kehl
54cce400f4 more s3 tests 2024-10-28 11:55:30 -07:00
Kenneth Kehl
f1e851d2f6 fix 2024-10-24 13:15:24 -07:00
Kenneth Kehl
19861424b3 add tests for get_job_and_metadata 2024-10-24 13:01:34 -07:00
Kenneth Kehl
4120a6579b fix flake8 2024-10-24 11:17:47 -07:00
Kenneth Kehl
6e78bb44a7 add more tests 2024-10-24 11:17:15 -07:00
Kenneth Kehl
0bc0730773 test exception block in get_job_from_s3 2024-10-24 10:49:04 -07:00
Kenneth Kehl
641deded10 add threadpoolexecutor test 2024-10-23 13:52:47 -07:00
Kenneth Kehl
b94f2c9765 try again 2024-10-23 09:09:42 -07:00
Kenneth Kehl
d99508d244 try again 2024-10-23 09:06:41 -07:00
Kenneth Kehl
ed86cd4a12 try again 2024-10-23 08:46:24 -07:00
Kenneth Kehl
f35973607f ugh 2024-10-23 08:35:53 -07:00
Kenneth Kehl
c2be180289 test read_s3_file 2024-10-23 07:54:39 -07:00
Kenneth Kehl
2344516909 add provider tasks tests 2024-10-22 15:00:09 -07:00
Kenneth Kehl
5d72b578c7 add provider tasks tests 2024-10-22 14:33:17 -07:00
Kenneth Kehl
c792a2492d cleanup 2024-10-02 07:58:24 -07:00
Kenneth Kehl
580885ab0c merge from main 2024-09-27 09:43:10 -07:00
Kenneth Kehl
24f2b9fc9f fix flake8 2024-09-26 13:32:07 -07:00
Kenneth Kehl
3cba7f157e fix tests 2024-09-26 13:29:22 -07:00
Kenneth Kehl
c2f2cbc3bb fix tests 2024-09-26 13:18:14 -07:00
Kenneth Kehl
561d813d4e remove redis_store mocking from s3 tests 2024-09-26 12:24:06 -07:00
Kenneth Kehl
e5ac50b694 add test 2024-09-26 07:17:12 -07:00
Kenneth Kehl
2f9fea909e actually start deleting old s3 objects 2024-09-11 07:31:50 -07:00
Kenneth Kehl
4e9e014a0c add test 2024-09-10 11:12:43 -07:00
Kenneth Kehl
baf878158f clean up s3 2024-08-16 11:10:10 -07:00
Kenneth Kehl
496571686a initial 2024-08-16 09:53:29 -07:00
Kenneth Kehl
0c3b382562 fix test 2024-08-15 17:25:03 -07:00
Kenneth Kehl
7258105c91 fix flake 8 2024-08-13 15:45:39 -07:00
Kenneth Kehl
db9197e7a6 ugh secrets 2024-08-13 15:32:43 -07:00
Kenneth Kehl
905df17f65 remove datetime.utcnow() 2024-05-23 13:59:51 -07:00
Kenneth Kehl
0010a431a6 merge from main again 2024-02-06 12:31:32 -08:00
Kenneth Kehl
82dd29d457 handle bom in phone number field 2024-02-01 12:01:29 -08:00
Kenneth Kehl
ed3a356ad1 merge from main and fix some tests 2024-01-19 08:58:24 -08:00
Kenneth Kehl
7997d887c6 fix case sensitivity looking up phone number 2024-01-18 10:53:20 -08:00
Kenneth Kehl
567dd390b4 fix personalisation 2024-01-18 10:03:35 -08:00
Kenneth Kehl
3e6229b87a fix tests add redis mock 2024-01-12 07:42:21 -08:00
Kenneth Kehl
726e0b15fa code review feedback 2024-01-08 14:31:28 -08:00
Kenneth Kehl
a5f78224b2 remove print statements 2024-01-05 10:39:07 -08:00
Kenneth Kehl
88379c9e46 final 2024-01-05 10:35:14 -08:00
Kenneth Kehl
c082546aa0 add migration for e2e tests and improve code coverage 2023-09-12 10:15:07 -07:00
Kenneth Kehl
1ecb747c6d reformat 2023-08-29 14:54:30 -07:00
Ryan Ahearn
84e7e9b5cf Use credentials output by terraform/development 2023-03-13 13:44:10 -04:00
Ryan Ahearn
22aa7e2787 Remove default creds from s3 module 2023-03-03 16:01:12 -05:00
Ryan Ahearn
538d2cbe4c Proactively specify aws region for s3 operations 2022-09-26 10:56:59 -04:00
Ryan Ahearn
8ede076708 Use correct access credentials for each bucket 2022-09-22 12:14:25 -04:00
Ben Thorner
ff7eebc90a Simplify deleting old letters
Previously we made a call to S3 to list objects for a letter, even
though we already had the precise key of the single object to hand.
This removes the one usage of "get_s3_bucket_objects" and uses the
filename directly in the call to remove the object.
2021-03-15 17:18:20 +00:00
Ben Thorner
a91fde2fda Run auto-correct on app/ and tests/ 2021-03-12 11:45:45 +00:00
Chris Hill-Scott
3b0b96834d Do extra code style checks with flake8-bugbear
Flake8 Bugbear checks for some extra things that aren’t code style
errors, but are likely to introduce bugs or unexpected behaviour. A
good example is having mutable default function arguments, which get
shared between every call to the function and therefore mutating a value
in one place can unexpectedly cause it to change in another.

This commit enables all the extra warnings provided by Flake8 Bugbear,
except for:
- the line length one (because we already lint for that separately)
- B903 Data class should either be immutable or use `__slots__` because
  this seems to false-positive on some of our custom exceptions
- B902 Invalid first argument 'cls' used for instance method because
  some SQLAlchemy decorators (eg `declared_attr`) make things that
  aren’t formally class methods take a class not an instance as their
  first argument

It disables:
- _B306: BaseException.message is removed in Python 3_ because I think
  our exceptions have a custom structure that means the `.message`
  attribute is still present

Matches the work done in other repos:
- https://github.com/alphagov/notifications-admin/pull/3172/files
2020-12-22 16:26:45 +00:00
Katie Smith
62b11bc61e Delete delete_dvla_response_files_older_than_seven_days task
This was not being used.
2020-04-02 14:49:47 +01:00
David McDonald
a14d5f0225 Remove task that no longer runs
We no longer puts files in these s3 buckets (and have in fact deleted
the buckets) therefore this task is redundant and can be removed.
2020-02-06 10:57:43 +00:00