Skip to content

Commit

Permalink
Merge pull request #48 from exonet/fix-account
Browse files Browse the repository at this point in the history
Fix providing account-value on new zone
  • Loading branch information
trizz authored Nov 6, 2020
2 parents 6befb71 + fb1b9ad commit 7893766
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
10 changes: 9 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,20 @@ All notable changes to `powerdns-php` will be documented in this file.
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.

## Unreleased
[Compare v2.5.0 - Unreleased](https://github.com/exonet/powerdns-php/compare/v2.5.0...develop)
[Compare v2.5.1 - Unreleased](https://github.com/exonet/powerdns-php/compare/v2.5.1...develop)

## [v2.5.1](https://github.com/exonet/powerdns-php/releases/tag/v2.5.1) - 2020-11-06
[Compare v2.5.0 - v2.5.1](https://github.com/exonet/powerdns-php/compare/v2.5.0...v2.5.1)
### Fixed
- The `account` is send to PowerDNS when creating a zone. (#47)

## [v2.5.0](https://github.com/exonet/powerdns-php/releases/tag/v2.5.0) - 2020-10-30
[Compare v2.4.0 - v2.5.0](https://github.com/exonet/powerdns-php/compare/v2.4.0...v2.5.0)
### Added
- Get PowerDNS statistics.

## [v2.4.0](https://github.com/exonet/powerdns-php/releases/tag/v2.4.0) - 2020-08-04
[Compare v2.3.1 - v2.4.0](https://github.com/exonet/powerdns-php/compare/v2.3.1...v2.4.0)
### Added
- Export a zone in AXFR format. (#35)
- Get the zone from a ResourceRecord. (#40)
Expand All @@ -25,6 +32,7 @@ Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) princip
- `$resouceRecord->getComments()` no longer throws an exception if there are no comments. (#38)

## [v2.3.1](https://github.com/exonet/powerdns-php/releases/tag/v2.3.1) - 2020-05-12
[Compare v2.3.0 - v2.3.1](https://github.com/exonet/powerdns-php/compare/v2.3.0...v2.3.1)
### Fixed
- No longer throw an exception when throwing an exception if the response body is not an error. (#32)

Expand Down
1 change: 1 addition & 0 deletions src/Transformers/CreateZoneTransformer.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ public function transform()
'masters' => $this->data->getMasters(),
'nameservers' => $this->data->getNameservers(),
'nsec3param' => $this->data->getNsec3param(),
'account' => $this->data->getAccount(),
];
}
}
2 changes: 2 additions & 0 deletions tests/functional/AdvancedZoneCreationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ public function testCreateSoaIncrementZone(): void
$newZone->setNameservers(['ns1.test.']);
$newZone->setApiRectify(false);
$newZone->setNsec3param('1 0 100 1234567890');
$newZone->setAccount('account-name');

// Create a new zone with the defined records and name servers.
$this->powerdns->createZoneFromResource($newZone);
Expand All @@ -38,5 +39,6 @@ public function testCreateSoaIncrementZone(): void
$this->assertSame(['ns1.test.'], $zoneResource->getNameservers());
$this->assertFalse($zoneResource->hasAutoRectify(), 'API Rectify not correctly set.');
$this->assertSame('1 0 100 1234567890', $zoneResource->getNsec3param());
$this->assertSame('account-name', $zoneResource->getAccount());
}
}

0 comments on commit 7893766

Please sign in to comment.