Skip to content

Commit

Permalink
Return delegate_to field for new ZoneDelegated object (#87)
Browse files Browse the repository at this point in the history
* Otherwise GetZoneDelegated returns the zone
  with empty DelegateTo
  • Loading branch information
ytsarev authored Mar 4, 2020
1 parent 1da13c0 commit 43d68f2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ type ZoneDelegated struct {
func NewZoneDelegated(za ZoneDelegated) *ZoneDelegated {
res := za
res.objectType = "zone_delegated"
res.returnFields = []string{"extattrs", "fqdn", "view"}
res.returnFields = []string{"extattrs", "fqdn", "view", "delegate_to"}

return &res
}
Expand Down
2 changes: 1 addition & 1 deletion objects_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ var _ = Describe("Objects", func() {

It("should set base fields correctly", func() {
Expect(za.ObjectType()).To(Equal("zone_delegated"))
Expect(za.ReturnFields()).To(ConsistOf("extattrs", "fqdn", "view"))
Expect(za.ReturnFields()).To(ConsistOf("extattrs", "fqdn", "view", "delegate_to"))
})
})

Expand Down

0 comments on commit 43d68f2

Please sign in to comment.