Skip to content

[9.x] Mock dns check during tests#43781

Merged
taylorotwell merged 2 commits into
laravel:9.xfrom
TheLevti:feature/fix-failing-dns-check-during-tests
Aug 19, 2022
Merged

[9.x] Mock dns check during tests#43781
taylorotwell merged 2 commits into
laravel:9.xfrom
TheLevti:feature/fix-failing-dns-check-during-tests

Conversation

@TheLevti

Copy link
Copy Markdown
Contributor

I noticed that sometimes windows tests failed (https://github.com/laravel/framework/runs/7163912435?check_suite_focus=true), because the active_url validator test was doing real DNS lookups, which must be avoided during test runs as sometimes this times out or fails. This is now fixed by mocking the dns record fetching and in addition may be overwritten by a custom way of fetching dns records.

The added changes are:

  • Mock actual DNS lookup calls (dns_get_record).

@TheLevti
TheLevti force-pushed the feature/fix-failing-dns-check-during-tests branch from 0c895d0 to 0dfd3c1 Compare August 19, 2022 14:24
@taylorotwell
taylorotwell merged commit ca1b6c4 into laravel:9.x Aug 19, 2022
@TheLevti
TheLevti deleted the feature/fix-failing-dns-check-during-tests branch August 19, 2022 19:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants