Skip to content

load-balancers: Add support for size_unit#742

Merged
bentranter merged 2 commits intodigitalocean:mainfrom
bbassingthwaite:bbass/lbaas/size-unit
Nov 8, 2021
Merged

load-balancers: Add support for size_unit#742
bentranter merged 2 commits intodigitalocean:mainfrom
bbassingthwaite:bbass/lbaas/size-unit

Conversation

@bbassingthwaite
Copy link
Copy Markdown
Contributor

No description provided.

@bbassingthwaite bbassingthwaite force-pushed the bbass/lbaas/size-unit branch 3 times, most recently from b0a575e to 84d6635 Compare November 4, 2021 18:42
Copy link
Copy Markdown
Member

@bentranter bentranter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great but could you update the tests as well for the new size_unit field? Thanks!

@bbassingthwaite
Copy link
Copy Markdown
Contributor Author

@bentranter done! Also added a test for using just size_unit.

Copy link
Copy Markdown
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

    resource_digitalocean_loadbalancer_test.go:113: Step 2/2 error: Check failed: 1 error occurred:
                * Check 4/13 error: digitalocean_loadbalancer.foobar: Attribute 'size' not found
        
--- FAIL: TestAccDigitalOceanLoadbalancer_Updated (284.68s)

Looks like this one needs updating as well:

"digitalocean_loadbalancer.foobar", "size", "lb-small"),

(GitHub won't let you comment on an unchanged line.)

Also noticing this one failing:

    resource_digitalocean_loadbalancer_test.go:471: Step 2/2, expected an error but got none
--- FAIL: TestAccDigitalOceanLoadbalancer_resizeExpectedFailure (104.86s)

Does the policy around resizing change with this release?

// Load balancers can only be resized once an hour. The initial create counts
// as a "resize" in this context. This test can not perform a resize, but it
// does ensure that the the PUT includes the expected content by checking for
// the failure.
func TestAccDigitalOceanLoadbalancer_resizeExpectedFailure(t *testing.T) {

@bbassingthwaite
Copy link
Copy Markdown
Contributor Author

TestAccDigitalOceanLoadbalancer_Updated

Fixed this one up!

TestAccDigitalOceanLoadbalancer_resizeExpectedFailure

We still have the same policy around resizing, but fixed the issue by moving the param to size_unit.

Copy link
Copy Markdown
Member

@andrewsomething andrewsomething left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 Looks good!

Copy link
Copy Markdown
Member

@bentranter bentranter left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM as well!

@bentranter bentranter merged commit 3dbbd78 into digitalocean:main Nov 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants