In Beta and Test versions of Canvas, we always want to send
the xxx.beta.instructure.com URL in LTI calls (NRPS, AGS, etc)
instead of the preferred domain.
fixes INTEROP-8102
flag=consistent_ags_ids_based_on_account_principal_domain
test plan:
1. temporarily modify local code for ApplicationController.test_cluster_name
to return a beta url
2. Launch an LTI 1.3 tool in an assignment context (e.g. create an LTI
1.3 assignment) and check both the "lineitems" and "lineitem" fields
3. Also check the context_memberships_url (NRPS) from the launch
4. Get an LTI advantage token for your LTI 1.3 tool
(/api/lti/advantage_token?tool_id=123) and GET the
/api/lti/courses/2/line_items endpoint, and check the "id" fields
of the returned results.
5. Post a score to the /courses/123/line_items/456 (etc.) endpoint --
see the example request from the docs at
https://canvas.instructure.com/doc/api/score.html --
and check the the "progress" URL (under content_items) and the
resultUrl returned.
6. Get the /api/lti/courses/2/line_items/1/results and check the URLs
in the "id" field and the "scoreOf" field.
7. Get the /api/lti/courses/2/names_and_roles endpoint and check the
URL in the "id" field.
Change-Id: I21ad34097442283f74dd70b28b1a46fbc8fbcaf8
Reviewed-on: https://gerrit.instructure.com/c/canvas-lms/+/320726
Tested-by: Service Cloud Jenkins <svc.cloudjenkins@instructure.com>
Reviewed-by: Tucker Mcknight <tmcknight@instructure.com>
QA-Review: Tucker Mcknight <tmcknight@instructure.com>
Product-Review: Alexis Nast <alexis.nast@instructure.com>