Skip to content

Add and update test coverage for spec v4.199.0#774

Merged
ykim-akamai merged 5 commits intolinode:devfrom
ykim-akamai:tests_for_spec-4.199.0
May 22, 2025
Merged

Add and update test coverage for spec v4.199.0#774
ykim-akamai merged 5 commits intolinode:devfrom
ykim-akamai:tests_for_spec-4.199.0

Conversation

@ykim-akamai
Copy link
Contributor

@ykim-akamai ykim-akamai commented May 22, 2025

📝 Description

New API spec 4.199.0 - https://github.com/linode/linode-api-docs/releases/tag/v4.199.0

Add test coverage for following commands:

+ firewalls firewall-settings-list (/{apiVersion}/networking/firewalls/settings)
+ firewalls firewall-settings-update (/{apiVersion}/networking/firewalls/settings)
+ firewalls template-view (/{apiVersion}/networking/firewalls/templates/{slug})
+ firewalls templates-list (/{apiVersion}/networking/firewalls/templates)
+ linodes firewalls-update (/{apiVersion}/linode/instances/{linodeId}/firewalls)
+ linodes interface-add (/{apiVersion}/linode/instances/{linodeId}/interfaces)
+ linodes interface-delete (/{apiVersion}/linode/instances/{linodeId}/interfaces/{interfaceId})
+ linodes interface-firewalls-list (/{apiVersion}/linode/instances/{linodeId}/interfaces/{interfaceId}/firewalls)
+ linodes interface-settings-update (/{apiVersion}/linode/instances/{linodeId}/interfaces/settings)
+ linodes interface-update (/{apiVersion}/linode/instances/{linodeId}/interfaces/{interfaceId})
+ linodes interface-view (/{apiVersion}/linode/instances/{linodeId}/interfaces/{interfaceId})
+ linodes interfaces-list (/{apiVersion}/linode/instances/{linodeId}/interfaces)
+ linodes interfaces-settings-list (/{apiVersion}/linode/instances/{linodeId}/interfaces/settings)
+ linodes interfaces-upgrade (/{apiVersion}/linode/instances/{linodeId}/upgrade-interfaces)
+ object-storage object-storage-quota-usage-view (/{apiVersion}/object-storage/quotas/{object-storage-quotaId}/usage)
+ object-storage object-storage-quota-view (/{apiVersion}/object-storage/quotas/{object-storage-quotaId})
+ object-storage object-storage-quotas (/{apiVersion}/object-storage/quotas)

✔️ How to Test

make test-int TEST_SUITE=linodes/test_linode_interfaces.py
make test-int TEST_SUITE=obj
make test-int TEST_SUITE=firewalls

📷 Preview

If applicable, include a screenshot or code snippet of this change. Otherwise, please remove this section.

@ykim-akamai ykim-akamai requested a review from a team as a code owner May 22, 2025 03:05
@ykim-akamai ykim-akamai added the testing for updates to the testing suite in the changelog. label May 22, 2025
@ykim-akamai ykim-akamai requested review from ezilber-akamai and lgarber-akamai and removed request for a team May 22, 2025 03:05
@ykim-akamai ykim-akamai marked this pull request as draft May 22, 2025 03:05
@ykim-akamai ykim-akamai marked this pull request as ready for review May 22, 2025 03:26
Copy link
Contributor

@lgarber-akamai lgarber-akamai left a comment

Choose a reason for hiding this comment

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

Looks great, thanks for handling this!

Just an FYI, the Linode tests only seem to pass when the interfaces_for_new_linodes account setting is set to legacy_config_default_but_linode_allowed and the LINODE_CLI_API_VERSION env var is set to v4beta. We might want to update our tests to specify an explicit interface_generation during the creation of instances.

I'm not sure if this will have an impact on users but I'd imagine we should vet that this release (along with the other Linode Interface releases) won't break users who don't have access to the new feature.

@ykim-akamai
Copy link
Contributor Author

Looks great, thanks for handling this!

Just an FYI, the Linode tests only seem to pass when the interfaces_for_new_linodes account setting is set to legacy_config_default_but_linode_allowed and the LINODE_CLI_API_VERSION env var is set to v4beta. We might want to update our tests to specify an explicit interface_generation during the creation of instances.

I'm not sure if this will have an impact on users but I'd imagine we should vet that this release (along with the other Linode Interface releases) won't break users who don't have access to the new feature.

Updated the tests and helper function. Refer to comment in PR for more details

firewall_id: str,
test_region=DEFAULT_REGION,
disk_encryption=False,
interface_generation: str = None,
Copy link
Contributor Author

@ykim-akamai ykim-akamai May 22, 2025

Choose a reason for hiding this comment

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

We can use this helper function to specifically use legacy or new interface. It will create a legacy linode If none



@pytest.fixture(scope="session")
def linode_interface_legacy(linode_cloud_firewall):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

e.g. Create linode with legacy config

@ykim-akamai ykim-akamai merged commit b697682 into linode:dev May 22, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

testing for updates to the testing suite in the changelog.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants