Skip to content

Commit

Permalink
add RecordSetsGlobalListAll integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mdb committed Sep 15, 2020
1 parent 6131b17 commit dcdc355
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
VERSION=0.9.12
SOURCE?=./...
VINYLDNS_REPO=github.com/vinyldns/vinyldns
VINYLDNS_VERSION=0.9.3
VINYLDNS_VERSION=0.9.4

all: check-fmt test build integration stop-api validate-version install

Expand Down
28 changes: 28 additions & 0 deletions vinyldns/integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,34 @@ func TestRecordSetsListAllIntegrationFilterForNonexistentName(t *testing.T) {
}
}

func TestRecordSetsGlobalListAllIntegrationFilterForExistentName(t *testing.T) {
c := client()
records, err := c.RecordSetsGlobalListAll(GlobalListFilter{
RecordNameFilter: "foo",
})
if err != nil {
t.Error(err)
}

if len(records) < 1 {
t.Error("Expected RecordSetsGlobalListAll for records named 'foo' to yield results")
}
}

func TestRecordSetsGlobalListAllIntegrationFilterForNonexistentName(t *testing.T) {
c := client()
records, err := c.RecordSetsGlobalListAll(GlobalListFilter{
RecordNameFilter: "thisdoesnotexist",
})
if err != nil {
t.Error(err)
}

if len(records) > 0 {
t.Error("Expected RecordSetsListAll for records named 'thisdoesnotexist' to yield no results")
}
}

func TestRecordSetDeleteIntegration(t *testing.T) {
c := client()
zs, err := c.ZonesListAll(ListFilter{})
Expand Down

0 comments on commit dcdc355

Please sign in to comment.