From 43d68f2d61e26303fb0dd1c91332ade17e8aa07c Mon Sep 17 00:00:00 2001 From: Yury Tsarev Date: Wed, 4 Mar 2020 18:01:11 +0100 Subject: [PATCH] Return delegate_to field for new ZoneDelegated object (#87) * Otherwise GetZoneDelegated returns the zone with empty DelegateTo --- objects.go | 2 +- objects_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/objects.go b/objects.go index 847028eb..9bea2ce2 100644 --- a/objects.go +++ b/objects.go @@ -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 } diff --git a/objects_test.go b/objects_test.go index d6d96518..14bf071c 100644 --- a/objects_test.go +++ b/objects_test.go @@ -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")) }) })