Skip to content

Commit 25465ab

Browse files
[Fix] provider type (#865)
1 parent 6ac9775 commit 25465ab

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

acceptance/openstack/tms/provider_test.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"testing"
66

77
"github.com/opentelekomcloud/gophertelekomcloud/acceptance/clients"
8+
"github.com/opentelekomcloud/gophertelekomcloud/openstack/common/pointerto"
89
"github.com/opentelekomcloud/gophertelekomcloud/openstack/tms/v1/provider"
910
th "github.com/opentelekomcloud/gophertelekomcloud/testhelper"
1011
)
@@ -16,7 +17,10 @@ func TestTMSProviderList(t *testing.T) {
1617
client, err := clients.NewTmsV1Client()
1718
th.AssertNoErr(t, err)
1819

19-
p, err := provider.List(client, provider.ListOpts{})
20+
p, err := provider.List(client, provider.ListOpts{
21+
Provider: "ecs",
22+
Limit: pointerto.Int(200),
23+
})
2024
th.AssertNoErr(t, err)
21-
th.AssertEquals(t, true, len(p) > 1)
25+
th.AssertEquals(t, true, len(p) > 0)
2226
}

openstack/tms/v1/provider/List.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type ListOpts struct {
1616
// The value must be a number and cannot be negative. The default value is 0.
1717
Offset *int `q:"offset"`
1818
// Specifies the cloud service name.
19-
Provider *int `q:"provider"`
19+
Provider string `q:"provider"`
2020
}
2121

2222
func List(client *golangsdk.ServiceClient, opts ListOpts) ([]Providers, error) {

0 commit comments

Comments
 (0)