archivematica / Issues

Issues repository for the Archivematica project
GNU Affero General Public License v3.0
16 stars 1 forks source link

Problem: vcrpy cassettes in automation tools do not use a consistent naming convention #601

Closed ross-spencer closed 4 years ago

ross-spencer commented 5 years ago

Expected behaviour

Finding a cassette either to refactor the package or re-record with ease should be easier.

Current behaviour

None of the cassettes adopt a consistent naming convention so it is difficult to see which module that they belong to.

E.g.

 fixtures/vcr_cassettes/deposit_fail.yaml
 fixtures/vcr_cassettes/deposit_success.yaml
 fixtures/vcr_cassettes/download_aip_success.yaml
 fixtures/vcr_cassettes/get_next_transfer_all_complete.yaml
 fixtures/vcr_cassettes/get_next_transfer_bad_source.yaml
 fixtures/vcr_cassettes/get_next_transfer_depth.yaml
 fixtures/vcr_cassettes/get_next_transfer_existing_set.yaml
 fixtures/vcr_cassettes/get_next_transfer_failed_auth.yaml
 fixtures/vcr_cassettes/get_next_transfer_files.yaml
 fixtures/vcr_cassettes/get_next_transfer_first_run.yaml
 fixtures/vcr_cassettes/get_next_transfer_no_prefix.yaml
 fixtures/vcr_cassettes/get_status_ingest.yaml
 fixtures/vcr_cassettes/get_status_no_unit.yaml
 fixtures/vcr_cassettes/get_status_not_json.yaml
 fixtures/vcr_cassettes/get_status_transfer.yaml
 fixtures/vcr_cassettes/get_status_transfer_to_ingest.yaml
 fixtures/vcr_cassettes/test_call_start_transfer_endpoint.yaml
 fixtures/vcr_cassettes/test_transfer_approve_transfer.yaml

Could each belong to one of the handful of scripts used in the automation tools.

Proposed solution

Rename each script with the test that it belongs to.

Alternatives considered

We could leave this as is, but this would be a nice change to make a devs life a bit easier without having to cat and ack.

Additional context

Twice discovered while a) packaging the amclient work, and b) removing the local references to amclient in the automation-tools, i.e. if the cassettes were labelled amclient it would have been easier to migrate them, and remove them.


For Artefactual use: Please make sure these steps are taken before moving this issue from Review to Verified in Waffle:

ross-spencer commented 4 years ago

Closing as this was resolved for automation-tools in the associated PRs. The test-fixtures were given prefixes and it looks like subsequently added fixtures follow a similar pattern, so all in all, fairly successful. Time will tell if this was useful to folk, feedback appreciated also.

image