Skip to content

TPT-4275: Resolve failings tests blocking release#708

Merged
lgarber-akamai merged 2 commits into
linode:devfrom
lgarber-akamai:fix/ci-blockers-20260611
Jun 11, 2026
Merged

TPT-4275: Resolve failings tests blocking release#708
lgarber-akamai merged 2 commits into
linode:devfrom
lgarber-akamai:fix/ci-blockers-20260611

Conversation

@lgarber-akamai

Copy link
Copy Markdown
Contributor

📝 Description

This pull request resolves the CI integration test failures that are blocking the release for Reserved IPv4.

✔️ How to Test

make test-int TEST_ARGS='-k "test_get_all_vpcs or test_update_linode_with_reserved_ip_in_address or test_create_linode_with_kernel_and_boot_size_then_add_disk_and_rebuild or test_linode_interfaces_with_reserved_ips"

@lgarber-akamai lgarber-akamai requested review from a team as code owners June 11, 2026 14:24
@lgarber-akamai lgarber-akamai added the testing for updates to the testing suite in the changelog. label Jun 11, 2026
@lgarber-akamai lgarber-akamai requested review from ezilber-akamai, mawilk90, mgwoj and yec-akamai and removed request for a team and mgwoj June 11, 2026 14:24
Comment on lines +266 to +275
def ssh_key_gen(tmp_path_factory):
key_path = tmp_path_factory.mktemp("ssh-key-gen") / "sdk-sshkey"

time.sleep(1)

pub_file = open("./sdk-sshkey.pub", "r")
pub_key = pub_file.read().rstrip()
subprocess.run(
["ssh-keygen", "-q", "-t", "rsa", "-f", str(key_path), "-N", ""],
check=True,
)

priv_file = open("./sdk-sshkey", "r")
priv_key = priv_file.read().rstrip()
pub_key = key_path.with_suffix(".pub").read_text().rstrip()
priv_key = key_path.read_text().rstrip()

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This is necessary because the previous implementation was non-blocking, which caused some weird timing issues in CI

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Improves integration test reliability by making VPC assertions deterministic and updating Linode creation in reserved-IP/interface tests to include generated SSH keys, with safer key generation using pytest temp paths.

Changes:

  • Replace brittle string-based VPC list assertions with ID-based membership checks.
  • Update Linode instance creation helpers/tests to pass authorized_keys sourced from a session-scoped ssh-keygen fixture.
  • Rework ssh_key_gen fixture to use subprocess + tmp_path_factory instead of writing/removing keys in the repo directory.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 5 comments.

File Description
test/integration/models/vpc/test_vpc.py Makes VPC list assertions robust by checking IDs rather than stringifying lists.
test/integration/models/linode/test_linode.py Adjusts Linode creation for reserved IP test and injects generated SSH authorized key.
test/integration/models/linode/interfaces/test_interfaces.py Extends Linode creation helpers and reserved IP test to accept/pass an authorized key.
test/integration/conftest.py Generates SSH keypair via ssh-keygen in a temp directory using subprocess.run.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread test/integration/models/linode/test_linode.py
Comment thread test/integration/models/linode/test_linode.py
Comment thread test/integration/models/linode/interfaces/test_interfaces.py
Comment thread test/integration/models/linode/interfaces/test_interfaces.py
Comment thread test/integration/conftest.py

@ezilber-akamai ezilber-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests passing locally!

@yec-akamai yec-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests passed locally!

@lgarber-akamai lgarber-akamai merged commit 3ccfd56 into linode:dev Jun 11, 2026
12 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