Skip to content

Restructure integration files and Refactor test fixtures and helpers#786

Merged
ykim-akamai merged 10 commits intolinode:devfrom
ykim-akamai:standardize_file_structure
Jun 17, 2025
Merged

Restructure integration files and Refactor test fixtures and helpers#786
ykim-akamai merged 10 commits intolinode:devfrom
ykim-akamai:standardize_file_structure

Conversation

@ykim-akamai
Copy link
Contributor

@ykim-akamai ykim-akamai commented Jun 9, 2025

📝 Description

  • Restructure test directory layout to organize tests by CLI command (e.g., linodes, domains), with localized fixtures.py and helpers.py for each
  • Remove duplicate test helpers and enhance exec_test_command with clearer error and debug messages
  • Scope fixtures appropriately to improve test isolation and reuse
  • Review and refine outdated or skipped tests for better reliability and coverage

✔️ How to Test

make test-int

📷 Preview

image

@ykim-akamai ykim-akamai requested a review from a team as a code owner June 9, 2025 22:29
@ykim-akamai ykim-akamai requested review from ezilber-akamai and yec-akamai and removed request for a team June 9, 2025 22:29

import pytest

from tests.integration.database.fixtures import ( # noqa: F401
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note: Use # noqa: F401 when importing from local fixtures.py to suppress "imported but unused" warnings for fixtures required by test functions via pytest's fixture injection.

@ykim-akamai ykim-akamai added the testing for updates to the testing suite in the changelog. label Jun 9, 2025
Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

This is a huge improvement! Looks good overall, but I got the following test failures locally:

FAILED tests/integration/linodes/test_linode_interfaces.py::test_interface_settings_update - RuntimeError: Command failed with exit code 2
FAILED tests/integration/regions/test_plugin_region_table.py::test_output - AssertionError: assert '-' in '│     │ IN  │     │     │     │    │     │    │    │     │     │    │     │    │'
FAILED tests/integration/ssh/test_plugin_ssh.py::test_ssh_instance_ready - TimeoutError: SSH timeout expired
ERROR tests/integration/linodes/test_backups.py::test_create_backup_with_backup_enabled - NameError: name 'DEFAULT_LINODE_TYPE' is not defined
ERROR tests/integration/linodes/test_linodes.py::test_create_linode_without_image_and_not_boot - NameError: name 'DEFAULT_LINODE_TYPE' is not defined

@ykim-akamai
Copy link
Contributor Author

Green Build on latest commit - https://github.com/linode/linode-cli/actions/runs/15691407989

Copy link
Contributor

@yec-akamai yec-akamai left a comment

Choose a reason for hiding this comment

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

Nice job refactoring the tests!

Copy link
Contributor

@ezilber-akamai ezilber-akamai left a comment

Choose a reason for hiding this comment

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

Nice work!

@ykim-akamai ykim-akamai merged commit 35d3835 into linode:dev Jun 17, 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.

3 participants

Comments