github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/networking/v2/extensions/external/testing/requests_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/huaweicloud/golangsdk/openstack/networking/v2/extensions/external"
     7  	"github.com/huaweicloud/golangsdk/openstack/networking/v2/networks"
     8  	th "github.com/huaweicloud/golangsdk/testhelper"
     9  )
    10  
    11  func TestListExternal(t *testing.T) {
    12  	var iTrue bool = true
    13  
    14  	networkListOpts := networks.ListOpts{
    15  		ID: "d32019d3-bc6e-4319-9c1d-6722fc136a22",
    16  	}
    17  
    18  	listOpts := external.ListOptsExt{
    19  		ListOptsBuilder: networkListOpts,
    20  		External:        &iTrue,
    21  	}
    22  
    23  	actual, err := listOpts.ToNetworkListQuery()
    24  	th.AssertNoErr(t, err)
    25  	th.AssertEquals(t, ExpectedListOpts, actual)
    26  }