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

     1  package testing
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/huaweicloud/golangsdk/openstack/rts/v1/stacktemplates"
     7  	th "github.com/huaweicloud/golangsdk/testhelper"
     8  	fake "github.com/huaweicloud/golangsdk/testhelper/client"
     9  )
    10  
    11  func TestGetTemplate(t *testing.T) {
    12  	th.SetupHTTP()
    13  	defer th.TeardownHTTP()
    14  	HandleGetSuccessfully(t, GetOutput)
    15  
    16  	actual, err := stacktemplates.Get(fake.ServiceClient(), "postman_stack", "16ef0584-4458-41eb-87c8-0dc8d5f66c87").Extract()
    17  	th.AssertNoErr(t, err)
    18  
    19  	expected := GetExpected
    20  	th.AssertDeepEquals(t, expected, string(actual))
    21  }