Copilot commented on code in PR #311:
URL: 
https://github.com/apache/cloudstack-terraform-provider/pull/311#discussion_r3764205589


##########
cloudstack/resource_cloudstack_ipaddress_test.go:
##########
@@ -68,6 +68,27 @@ func TestAccCloudStackIPAddress_vpc(t *testing.T) {
        })
 }
 
+func TestAccCloudStackIPAddress_specificIP(t *testing.T) {
+       var ipaddr cloudstack.PublicIpAddress
+
+       resource.Test(t, resource.TestCase{
+               PreCheck:     func() { testAccPreCheck(t) },
+               Providers:    testAccProviders,
+               CheckDestroy: testAccCheckCloudStackIPAddressDestroy,
+               Steps: []resource.TestStep{
+                       {
+                               Config: testAccCloudStackIPAddress_specificIP,
+                               Check: resource.ComposeTestCheckFunc(
+                                       testAccCheckCloudStackIPAddressExists(
+                                               "cloudstack_ipaddress.foo", 
&ipaddr),
+                                       resource.TestCheckResourceAttr(
+                                               "cloudstack_ipaddress.foo", 
"ip_address", "10.2.2.10"),

Review Comment:
   The new acceptance test doesn't actually validate that the provider passes 
`ip_address` through to the CloudStack API: the VLAN IP range contains only a 
single IP, so CloudStack would return `10.2.2.10` even if the provider ignored 
the argument. To ensure this test fails without the new functionality, request 
an address that is *not* the first/only free IP in the range (e.g., create a 
2-IP range and request the second IP).
   
   This issue also appears in the following locations of the same file:
   - line 211
   - line 225



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to