github.com/vnpaycloud-console/gophercloud/v2@v2.0.5/openstack/orchestration/v1/buildinfo/testing/requests_test.go (about)

     1  package testing
     2  
     3  import (
     4  	"context"
     5  	"testing"
     6  
     7  	"github.com/vnpaycloud-console/gophercloud/v2/openstack/orchestration/v1/buildinfo"
     8  	th "github.com/vnpaycloud-console/gophercloud/v2/testhelper"
     9  	fake "github.com/vnpaycloud-console/gophercloud/v2/testhelper/client"
    10  )
    11  
    12  func TestGetTemplate(t *testing.T) {
    13  	th.SetupHTTP()
    14  	defer th.TeardownHTTP()
    15  	HandleGetSuccessfully(t, GetOutput)
    16  
    17  	actual, err := buildinfo.Get(context.TODO(), fake.ServiceClient()).Extract()
    18  	th.AssertNoErr(t, err)
    19  
    20  	expected := GetExpected
    21  	th.AssertDeepEquals(t, expected, actual)
    22  }