This change adds basic powerdns functionality (for, among others, woat)
Details
- Reviewers
machniak - Group Reviewers
Restricted Project - Commits
- rK6cf47624770c: Basic PowerDNS functionality
./phpunit
Diff Detail
- Repository
- rK kolab
- Branch
- master
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 36064 Build 14158: arc lint + arc unit
Event Timeline
Minor comments just after the code review, no testing and closer look on it yet.
src/app/Console/Commands/PowerDNS/Domain/CreateCommand.php | ||
---|---|---|
41 | Theinput should be validated. | |
src/app/Observers/PowerDNS/DomainObserver.php | ||
15 | Just $domain->name everywhere. | |
src/app/PowerDNS/Domain.php | ||
18 | You could use $this->records()->where('type', 'SOA')->first() here. | |
src/tests/Feature/PowerDNS/DomainTest.php | ||
60 | It should have a test for the domain observer - domain creation. |
src/app/Observers/PowerDNS/DomainObserver.php | ||
---|---|---|
25 | Four of these Record::create() calls will invoke bumpSerial() on the domain. We should disable the Record 'created' event handler temporarily. Look for withoutEvents on https://stackoverflow.com/questions/29407818/is-it-possible-to-temporarily-disable-event-in-laravel/51301753 or do manual inserts. |
- Minimal validation.
- Just use $domain->name everywhere
- Disable domain observer events in turn bumping the serial
- Make use of the records relation
- Fix typo, test domain creation/observer
One last issue. Other than that it looks good. I didn't test the docker part, I guess we'll need some intergration tests later.
src/tests/Feature/PowerDNS/DomainTest.php | ||
---|---|---|
19 | This 'domain' property needs to be declared, otherwise there's a phpstan error. |