TPT-4275: Resolve failings tests blocking release#708
Conversation
| 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() |
There was a problem hiding this comment.
This is necessary because the previous implementation was non-blocking, which caused some weird timing issues in CI
There was a problem hiding this comment.
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_keyssourced from a session-scopedssh-keygenfixture. - Rework
ssh_key_genfixture to usesubprocess+tmp_path_factoryinstead 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.
ezilber-akamai
left a comment
There was a problem hiding this comment.
Tests passing locally!
yec-akamai
left a comment
There was a problem hiding this comment.
Tests passed locally!
📝 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"