github.com/opentelekomcloud/gophertelekomcloud@v0.9.3/openstack/dns/v2/nameservers/testing/requests_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/opentelekomcloud/gophertelekomcloud/openstack/dns/v2/nameservers"
     7  	th "github.com/opentelekomcloud/gophertelekomcloud/testhelper"
     8  	"github.com/opentelekomcloud/gophertelekomcloud/testhelper/client"
     9  )
    10  
    11  func TestList(t *testing.T) {
    12  	th.SetupHTTP()
    13  	defer th.TeardownHTTP()
    14  	HandleListSuccessfully(t)
    15  
    16  	zoneID := "2c9eb155587194ec01587224c9f90149"
    17  	actual, err := nameservers.List(client.ServiceClient(), zoneID).Extract()
    18  
    19  	th.AssertNoErr(t, err)
    20  	th.CheckEquals(t, 2, len(actual))
    21  }