github.com/huaweicloud/golangsdk@v0.0.0-20210831081626-d823fe11ceba/openstack/rds/v3/securities/testing/requests_test.go (about) 1 package testing 2 3 import ( 4 "testing" 5 6 "github.com/huaweicloud/golangsdk/openstack/rds/v3/securities" 7 th "github.com/huaweicloud/golangsdk/testhelper" 8 "github.com/huaweicloud/golangsdk/testhelper/client" 9 ) 10 11 func TestUpdateV2DatabaseSSL(t *testing.T) { 12 th.SetupHTTP() 13 defer th.TeardownHTTP() 14 handleV2DatabaseSSLUpdate(t) 15 16 err := securities.UpdateSSL(client.ServiceClient(), "fda30974248d449e9dbdce8ae65d5ba0in01", sslOpts).ExtractErr() 17 th.AssertNoErr(t, err) 18 } 19 20 func TestUpdateV2DatabasePort(t *testing.T) { 21 th.SetupHTTP() 22 defer th.TeardownHTTP() 23 handleV2DatabasePortUpdate(t) 24 25 actual, err := securities.UpdatePort(client.ServiceClient(), "fda30974248d449e9dbdce8ae65d5ba0in01", 26 portOpts).Extract() 27 th.AssertNoErr(t, err) 28 th.AssertDeepEquals(t, expectedGetResponseData, actual) 29 } 30 31 func TestUpdateV2SecurityGroup(t *testing.T) { 32 th.SetupHTTP() 33 defer th.TeardownHTTP() 34 handleV2SecurityGroupUpdate(t) 35 36 actual, err := securities.UpdateSecGroup(client.ServiceClient(), "fda30974248d449e9dbdce8ae65d5ba0in01", 37 secGroupOpts).Extract() 38 th.AssertNoErr(t, err) 39 th.AssertDeepEquals(t, expectedGetResponseData, actual) 40 }