Skip to content

TPT-4472: Create tests for stream commands - #901

Draft
psnoch-akamai wants to merge 4 commits into
linode:devfrom
psnoch-akamai:TPT-4472-linode-cli-create-integration-tests-for-new-commands
Draft

psnoch-akamai wants to merge 4 commits into
linode:devfrom
psnoch-akamai:TPT-4472-linode-cli-create-integration-tests-for-new-commands

Conversation

@psnoch-akamai

Copy link
Copy Markdown
Contributor

📝 Description

Create tests for stream commands

✔️ How to Test

@psnoch-akamai psnoch-akamai changed the title TPT-4472 Create tests for stream commands TPT-4472: Create tests for stream commands Jun 30, 2026
@psnoch-akamai
psnoch-akamai force-pushed the TPT-4472-linode-cli-create-integration-tests-for-new-commands branch from ef2bcee to 46eb9cb Compare November 4, 2026 16:15
@psnoch-akamai
psnoch-akamai requested a balanced review from Copilot November 4, 2026 16:30

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.

🟡 Changes recommended

Negative tests assume ID 1 is invalid and can delete unrelated destinations or create unmanaged streams, while fixture defects cause setup failures and incomplete cleanup.

5 open issues
What changed in this PR

Adds integration coverage for the CLI’s stream and destination commands, including error handling and resource lifecycle checks.

Changes:

  • Adds help, listing, and negative-command tests, with smoke coverage for listings.
  • Exercises destination creation, viewing, history, and deletion, plus an opt-in long-running stream test.
  • Adds resource fixtures, status polling, and shared command registration.
File Description
tests/​integration/​streams/​test_streams.py Tests stream help, listing, errors, creation, and viewing.
tests/​integration/​streams/​test_destination.py Tests destination listing, errors, lifecycle, and history.
tests/​integration/​streams/​fixtures.py Provides storage-key, destination, and stream fixtures with cleanup and polling.
tests/​integration/​helpers.py Registers streams in the shared command map.

Review effort: Balanced

Comment on lines +23 to +24
host = os.getenv("LINODE_CLI_API_HOST")
if token is None:
@pytest.fixture
def create_object_storage_keys():
label = get_random_text(8) + "_destination_cli_test"
test_bucket = get_object_storage_buckets()["data"][0]
Comment thread tests/integration/streams/fixtures.py Resolved
Comment thread tests/integration/streams/fixtures.py Resolved
@psnoch-akamai
psnoch-akamai force-pushed the TPT-4472-linode-cli-create-integration-tests-for-new-commands branch from 46eb9cb to ef70629 Compare November 6, 2026 15:41
@psnoch-akamai
psnoch-akamai requested a balanced review from Copilot November 6, 2026 15:41

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.

🟡 Changes recommended

Fixture setup fails with the normal token-only configuration or an empty bucket list, and destination-creation failures can expose credentials in CI logs.

3 open issues
3 resolved since last review

Review effort: Balanced

Comment on lines +124 to +125
"--details.access_key_secret",
create_object_storage_keys[1],

This branch has not been deployed

No deployments
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.

2 participants