Fix setupInstanceFirewall
function for accounts with default firewall
#741
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
📝 Description
For some accounts with default firewall setting, the Linode will be created behind the default firewall even if
firewall_id
is not configured for the Linode creation options. Updating the test function to add thefirewall_id
in the creation options to override the default firewall. Otherwise, we won't be able to add the Linode to the test firewall after creation because it would already be behind the default firewall.Other changes:
t.Cleanup
forsetupInstanceFirewall
.✔️ How to Test
If you would like to add a default firewall to your account before verifying the test case, you can call the API with cURL with the default firewall ID for each Linode resource as below.
WARNING:
This action cannot be undone. Once you configure the default firewall, you can only change it to another firewall; you cannot unset it.
And it's unclear whether having a default firewall will affect some other tests.
make TEST_ARGS="-run TestInstanceFirewalls_List" fixtures