From 61e3456a0593f127a6a536bfc690b3bb9ec5ccf3 Mon Sep 17 00:00:00 2001 From: Mike Ball Date: Wed, 16 Sep 2020 10:05:13 -0400 Subject: [PATCH] improve RecordSetsGlobalListAll integration test This makes the test a bit less complex and brittle. --- vinyldns/integration_test.go | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) diff --git a/vinyldns/integration_test.go b/vinyldns/integration_test.go index bb5020c..251839b 100644 --- a/vinyldns/integration_test.go +++ b/vinyldns/integration_test.go @@ -399,29 +399,10 @@ func TestRecordSetsListAllIntegrationFilterForNonexistentName(t *testing.T) { func TestRecordSetsGlobalListAllIntegrationFilterForExistentName(t *testing.T) { c := client() - rName := "global-list-int-test" - zs, err := c.ZonesListAll(ListFilter{}) - if err != nil { - t.Error(err) - } - - _, err = c.RecordSetCreate(&RecordSet{ - Name: rName, - ZoneID: zs[0].ID, - Type: "A", - TTL: 60, - Records: []Record{ - { - Address: "127.0.0.1", - }, - }, - }) - if err != nil { - t.Error(err) - } + rName := "foo" records, err := c.RecordSetsGlobalListAll(GlobalListFilter{ - RecordNameFilter: rName + "*", + RecordNameFilter: "*" + rName + "*", }) if err != nil { t.Error(err)