google-nomulus/javatests/google/registry/flows/testdata
jianglai ff221fba96 Validate individual fee types
Currently we validate the fee extension by summing up all fees present in the extension and comparing it against the total fee to be charged. While this works in most cases, we'd like the ability to individually validate each fee. This is especially useful during EAP when two fees are charged, a regular "create" fee that would also be amount we charge during renewal, and a one time "EAP" fee.

Because we can only distinguish fees by their descriptions, we try to match the description to the format string of the fee type enums. We also only require individual fee matches when we are charging more than one type of fees, which makes the change compatible with most existing use cases where only one fees is charged and the description field is ignored in the extension.

We expect the workflow to be that a registrar sends a domain check, and we reply with exactly what fees we are expecting, and then it will use the descriptions in the response to send us a domain create with the correct fees.

Note that we aggregate fees within the same FeeType together. Normally there will only be one fee per type, but in case of custom logic there could be more than one fee for the same type. There is no way to distinguish them as they both use the same description. So it is simpler to just aggregate them.

This CL also includes some reformatting that conforms to google-java-format output.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=186530316
2018-03-06 18:48:39 -05:00
..
contact_create_billion_laughs.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_jd1234.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_local_xxe.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_remote_xxe.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_response_jd1234.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_response_sh8013.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_create_sh8013.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_delete_response_sh8013.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_delete_sh8013.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_info.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_info_from_create_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_transfer_request.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
contact_transfer_request_response_alternate.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_allocate_response_testvalidate.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_allocate_testvalidate.xml Flatten the domain and application create flows 2016-10-19 13:08:33 -04:00
domain_check_fee_premium.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_check_fee_premium_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_create.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_create_eap_fee.xml Validate individual fee types 2018-03-06 18:48:39 -05:00
domain_create_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_create_fakesite_no_nameservers.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
domain_create_no_hosts_or_dsdata.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_create_prettyprinted.xml Add new JSON logging to FlowRunner for EPP activity reporting 2016-06-27 16:45:55 -04:00
domain_create_response.xml Consolidate some domain creation / deletion EPPs in testdata 2018-02-01 22:03:57 -05:00
domain_create_response_eap_fee.xml Add an EPP lifecycle test verifying that EAP fees are not refunded 2017-12-27 11:29:07 -05:00
domain_create_secondsite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_create_start_date_sunrise_encoded_mark.xml Add the START_DATE_SUNRISE phase 2018-02-20 15:45:27 -05:00
domain_create_sunrise_encoded_mark.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_create_sunrise_encoded_signed_mark_response.xml Flatten the domain and application create flows 2016-10-19 13:08:33 -04:00
domain_create_wildcard.xml Add better testing of domain and host creation using multi-part TLDs 2017-08-29 15:47:50 -04:00
domain_delete.xml Consolidate some domain creation / deletion EPPs in testdata 2018-02-01 22:03:57 -05:00
domain_delete_response_fee.xml Add an EPP lifecycle test verifying that EAP fees are not refunded 2017-12-27 11:29:07 -05:00
domain_info.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_info_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_info_response_fakesite_3_nameservers.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_info_response_fakesite_3_nameservers_pending_transfer.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_info_response_fakesite_3_nameservers_transfer_successful.xml Restrict domain transfer periods to 1 year 2017-03-21 15:11:07 -04:00
domain_info_response_fakesite_inactive.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
domain_info_response_fakesite_ok.xml Add top-level python directory to opensource repo 2016-07-15 14:56:22 -04:00
domain_info_response_fakesite_ok_post_host_update.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
domain_info_response_fakesite_pending_delete.xml Add top-level python directory to opensource repo 2016-07-15 14:56:22 -04:00
domain_info_response_fakesite_pending_transfer.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_info_response_fakesite_pending_transfer_autorenew.xml Add top-level python directory to opensource repo 2016-07-15 14:56:22 -04:00
domain_info_response_fakesite_restored_ok.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_info_response_fakesite_transfer_complete.xml Restrict domain transfer periods to 1 year 2017-03-21 15:11:07 -04:00
domain_info_response_fakesite_transfer_period.xml Restrict domain transfer periods to 1 year 2017-03-21 15:11:07 -04:00
domain_info_response_testvalidate_ok.xml Add top-level python directory to opensource repo 2016-07-15 14:56:22 -04:00
domain_info_response_wildcard.xml Add an EPP lifecycle test verifying that EAP fees are not refunded 2017-12-27 11:29:07 -05:00
domain_info_testvalidate.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_transfer_query_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_transfer_query_response_completed_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_transfer_query_response_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_transfer_request.xml Restrict domain transfer periods to 1 year 2017-03-21 15:11:07 -04:00
domain_transfer_request_1_year.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_transfer_response.xml Restrict domain transfer periods to 1 year 2017-03-21 15:11:07 -04:00
domain_transfer_response_1_year.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_update_add_nameserver_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_update_add_nameserver_response_fakesite.xml Add top-level python directory to opensource repo 2016-07-15 14:56:22 -04:00
domain_update_dsdata_add.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_update_dsdata_rem.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_update_restore_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
domain_update_restore_request.xml Dagger, meet Flows. Flows, meet Dagger. 2016-06-27 16:26:29 -04:00
domain_update_restore_request_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
generic_success_action_pending_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
generic_success_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
greeting.xml Finish YAMLification of last necessary config values 2017-02-03 12:37:38 -05:00
hello.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_create.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_create_example.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_create_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_create_fakesite2.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_create_response.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_create_response_example.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_create_response_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_create_response_fakesite2.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_create_with_ips.xml Add better testing of domain and host creation using multi-part TLDs 2017-08-29 15:47:50 -04:00
host_delete.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_info_fakesite2.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_info_ns9000_example.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_info_response.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info_response_fakesite2.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_info_response_fakesite_linked.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_info_response_fakesite_ok.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_info_response_fakesite_post_transfer.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info_response_fakesite_post_transfer_and_update.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info_response_fakesite_post_transfer_and_update_no_addresses.xml Add more EPP metric lifecycle tests 2017-05-03 10:58:51 -04:00
host_info_response_fakesite_post_update.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_info_response_ns1.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_info_response_ns2.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_info_response_ns9000_example.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_update_fakesite.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_update_fakesite1_to_fakesite2.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_update_ns1_to_fakesite.xml Disallow renaming of external hosts 2017-03-21 15:24:28 -04:00
host_update_ns1_to_ns2.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_update_rename_and_remove_addresses.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
host_update_rename_only.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
login2_valid.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
login_invalid_wrong_password.xml Actionize the EPP endpoints. 2016-06-14 16:30:12 -04:00
login_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
login_valid.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
login_valid_fee_extension.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
logout.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
logout_response.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
poll.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
poll_ack.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
poll_ack_response_empty.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00
poll_response_autorenew.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
poll_response_contact_transfer.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
poll_response_domain_transfer_request.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
poll_response_domain_transfer_server_approve_loser.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
poll_response_domain_transfer_server_approve_winner.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
poll_response_empty.xml Append event year to poll message external IDs 2017-12-13 12:43:45 -05:00
response_error.xml Consolidate some domain creation / deletion EPPs in testdata 2018-02-01 22:03:57 -05:00
response_error_no_cltrid.xml Consolidate some domain creation / deletion EPPs in testdata 2018-02-01 22:03:57 -05:00
syntax_error.xml mv com/google/domain/registry google/registry 2016-05-13 18:55:08 -04:00