github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/rts/v1/stackresources/testing/requests_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/huaweicloud/golangsdk/openstack/rts/v1/stackresources"
     7  	th "github.com/huaweicloud/golangsdk/testhelper"
     8  	fake "github.com/huaweicloud/golangsdk/testhelper/client"
     9  )
    10  
    11  func TestListResources(t *testing.T) {
    12  	th.SetupHTTP()
    13  	defer th.TeardownHTTP()
    14  	HandleListSuccessfully(t, ListOutput)
    15  
    16  	//count := 0
    17  	actual, err := stackresources.List(fake.ServiceClient(), "hello_world", stackresources.ListOpts{})
    18  	if err != nil {
    19  		t.Errorf("Failed to extract resources: %v", err)
    20  	}
    21  	th.AssertDeepEquals(t, ListExpected, actual)
    22  }