Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,7 @@ func removeRecords(rRSet zones.ResourceRecordSet, culls []libdns.Record) zones.R
recs := rRSet.Records
for i := len(recs) - 1; i >= 0; i-- {
if recs[i].Content == item {
copy(recs[i:], recs[:i+1])
recs = recs[:len(recs)-1]
recs = append(recs[:i], recs[i+1:]...)
}
}
return recs
Expand Down
6 changes: 3 additions & 3 deletions client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,10 +222,10 @@ func TestPDNSClient(t *testing.T) {
{
Name: "2",
Type: "A",
Value: "127.0.0.7",
Value: "127.0.0.5",
},
},
want: []string{"1:127.0.0.1", "1:127.0.0.2", "1:127.0.0.3", "2:127.0.0.4", "2:127.0.0.5", "2:127.0.0.6"},
want: []string{"1:127.0.0.1", "1:127.0.0.2", "1:127.0.0.3", "2:127.0.0.4", "2:127.0.0.6", "2:127.0.0.7"},
},
{
name: "Test Append and Add Zone",
Expand All @@ -245,7 +245,7 @@ func TestPDNSClient(t *testing.T) {
},
},
want: []string{"1:127.0.0.1", "1:127.0.0.2", "1:127.0.0.3",
"2:127.0.0.4", "2:127.0.0.5", "2:127.0.0.6", "2:127.0.0.8",
"2:127.0.0.4", "2:127.0.0.6", "2:127.0.0.7", "2:127.0.0.8",
"3:127.0.0.9"},
},
{
Expand Down
22 changes: 2 additions & 20 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,12 @@
version: "3"
services:
mysql:
image: mariadb:10.6
environment:
MYSQL_ROOT_PASSWORD: immelting
MYSQL_USER: powerdns
MYSQL_PASSWORD: secret
MYSQL_DATABASE: powerdns
volumes:
- database:/var/lib/mysql
networks:
- backend
powerdns:
image: psitrax/powerdns
environment:
MYSQL_HOST: mysql
MYSQL_USER: powerdns
MYSQL_PASS: secret
MYSQL_DB: powerdns
image: powerdns/pdns-auth-47
networks:
- backend
volumes:
- ./.docker/pdns:/etc/pdns/conf.d
- ./.docker/pdns:/etc/powerdns/pdns.d
ports:
- 8081:8081
volumes:
database: {}
networks:
backend: {}