| 1 | package location |
| 2 | |
| 3 | import ( |
| 4 | "testing" |
| 5 | |
| 6 | "github.com/denverdino/aliyungo/common" |
| 7 | ) |
| 8 | |
| 9 | func TestDescribeEndpoint(t *testing.T) { |
| 10 | client := NewTestClientForDebug() |
| 11 | |
| 12 | args := &DescribeEndpointArgs{ |
| 13 | Id: common.Hangzhou, |
| 14 | ServiceCode: "slb", |
| 15 | Type: "openAPI", |
| 16 | } |
| 17 | |
| 18 | endpoint, err := client.DescribeEndpoint(args) |
| 19 | if err != nil { |
| 20 | t.Fatalf("Failed to describe endpoint %++v", err) |
| 21 | } |
| 22 | |
| 23 | t.Logf("endpoint is %++v", endpoint) |
| 24 | } |
| 25 | |
| 26 | func TestDescribeEndpoints(t *testing.T) { |
| 27 | client := NewTestClientForDebug() |
| 28 | |
| 29 | args := &DescribeEndpointsArgs{ |
| 30 | Id: common.Hangzhou, |
| 31 | ServiceCode: "slb", |
| 32 | Type: "openAPI", |
| 33 | } |
| 34 | |
| 35 | endpoints, err := client.DescribeEndpoints(args) |
| 36 | if err != nil { |
| 37 | t.Fatalf("Failed to describe endpoints %++v", err) |
| 38 | } |
| 39 | |
| 40 | t.Logf("endpoints is %++v", endpoints) |
| 41 | } |