Skip to content

[BB-3616]: Add check for DNS configuration

Boros Gábor requested to merge arjun/bb-3616-dns-check into master

Created by: arjunsinghy96

If external domain is added to the instance, we need to check that proper CNAME records are created with the DNS by use.

Related Tickets: BB-3616

Testing Instructions:

  1. Checkout to this branch
  2. Run migrations using make migrate
  3. Run dev server using make run.dev
  4. Open admin panel
  5. Create a test User with a BetaTestApplication
  6. Make the following curl request (replace variable with proper values)
curl -X PATCH 'http://localhost:5000/api/v2/instances/openedx_config/:instance_id/' \
  -H 'Authorization: Bearer <jwt-token>' \
  -H 'Content-Type: application/json' \
  -H 'Accept: */*' \
  --data-raw '{"external_domain":"a-new-domain.com"}' \
  --compressed
  1. Verify that a task is scheduled (worker logs)

  2. Verify that the task is started after 1 minute (worker logs)

  3. Verfiy that the DNS configuration check fails and is logged (worker logs)

  4. Verfiy that the Email log is printed (worker logs)

  5. Check that templates/emails/dns_not_configured.txt and templates/emails/dns_not_configured.html have appropriate data corresponding to this Zeplin design

  6. Run make test.one registration.tests and verfiy that all unittests pass.

Merge request reports