[BB-3616]: Add check for DNS configuration
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:
- Checkout to this branch
- Run migrations using
make migrate
- Run dev server using
make run.dev
- Open admin panel
- Create a test
User
with aBetaTestApplication
- 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
-
Verify that a task is scheduled (worker logs)
-
Verify that the task is started after 1 minute (worker logs)
-
Verfiy that the DNS configuration check fails and is logged (worker logs)
-
Verfiy that the Email log is printed (worker logs)
-
Check that
templates/emails/dns_not_configured.txt
andtemplates/emails/dns_not_configured.html
have appropriate data corresponding to this Zeplin design -
Run
make test.one registration.tests
and verfiy that all unittests pass.