Skip to content

TPT-4264: Create tests for Create Linodes Options and Password-less#887

Open
psnoch-akamai wants to merge 2 commits into
linode:devfrom
psnoch-akamai:TPT-4264-linode-cli-add-integration-tests-for-expand-create-linodes-options-and-password-less
Open

TPT-4264: Create tests for Create Linodes Options and Password-less#887
psnoch-akamai wants to merge 2 commits into
linode:devfrom
psnoch-akamai:TPT-4264-linode-cli-add-integration-tests-for-expand-create-linodes-options-and-password-less

Conversation

@psnoch-akamai
Copy link
Copy Markdown
Contributor

@psnoch-akamai psnoch-akamai commented May 11, 2026

✔️ How to Test

make test-int TEST_CASE=test_expected_error_if_fields_authorized_users_authorized_keys_root_pass_are_not_set
make test-int TEST_CASE=test_create_linode_with_kernel_and_boot_size_then_add_disk_and_rebuild

TECH doc PR: https://git.source.akamai.com/projects/TECHDOCS/repos/akamai-api-inventory/pull-requests/2685/overview - to build it fix from #888 is needed

@psnoch-akamai psnoch-akamai requested review from a team as code owners May 11, 2026 15:24
@psnoch-akamai psnoch-akamai requested review from jbilskiAkam and mawilk90 and removed request for a team May 11, 2026 15:24
Comment thread tests/integration/linodes/helpers.py Outdated
must_end = time.time() + timeout
while time.time() < must_end:
time.sleep(period)
result = exec_test_command(
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.

Please verify if test pass for you. I get error randomly:

E Request failed: 404
E Not found

Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 May 12, 2026

Choose a reason for hiding this comment

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

Yes, it fails so maybe usage of wait_for_condition is going to help (as mentioned here)?

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.

I'm also getting the 404

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.

The same result with wait_for_condition. Seems like API issue and if status is not ready it is not available for some time

@psnoch-akamai psnoch-akamai changed the title Create tests for Create Linodes Options and Password-less TPT-4264: Create tests for Create Linodes Options and Password-less May 11, 2026
@mawilk90
Copy link
Copy Markdown
Contributor

It's worth to mention that using openapi.json from TECH doc PR mentioned in the description will fail with the current linode-cli's parser. Solution provided here

@mawilk90 mawilk90 requested a review from ezilber-akamai May 12, 2026 11:01


def wait_for_disk_status(
linode_id: "str", disk_id: "str", timeout, status: "str", period=10
Copy link
Copy Markdown
Contributor

@mawilk90 mawilk90 May 12, 2026

Choose a reason for hiding this comment

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

Is it not possible to use existing wait_for_condition instead of creating a new method?

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.

Good idea, but probably I need to use custom one, because of 404 error

@psnoch-akamai psnoch-akamai force-pushed the TPT-4264-linode-cli-add-integration-tests-for-expand-create-linodes-options-and-password-less branch from 7ef03e3 to 2241491 Compare May 13, 2026 17:15
@psnoch-akamai psnoch-akamai force-pushed the TPT-4264-linode-cli-add-integration-tests-for-expand-create-linodes-options-and-password-less branch from cb2d072 to 36e4858 Compare May 13, 2026 17:49
Copy link
Copy Markdown
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.

Tests passing locally. Nice work!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants