Skip to content

Tests for query command outputs #37343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jul 24, 2025
Merged

Tests for query command outputs #37343

merged 4 commits into from
Jul 24, 2025

Conversation

dsa0x
Copy link
Member

@dsa0x dsa0x commented Jul 18, 2025

This PR introduces some tests for query command outputs. Also, a warning is returned when the config does not have any list resources.

Target Release

1.14.x

Rollback Plan

  • If a change needs to be reverted, we will roll out an update to the code within 7 days.

Changes to Security Controls

Are there any changes to security controls (access controls, encryption, logging) in this pull request? If so, explain.

CHANGELOG entry

  • This change is user-facing and I added a changelog entry.
  • This change is not user-facing.

t.Fatalf("bad: %d\n\n%s", code, output.Stderr())

// Check that we have query output
if !strings.Contains(actual, ts.expectedOut) {
Copy link
Member

Choose a reason for hiding this comment

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

I expected this test to fail after merging the updates to the line-based output. However, it appears that this line is never executed. I think the if statements are mixed up here.

@dsa0x dsa0x force-pushed the sams/query-output-testing branch from bc8b6c9 to e835242 Compare July 24, 2025 10:09
Copy link
Member

@dbanck dbanck 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!

@dsa0x dsa0x merged commit 36836fd into main Jul 24, 2025
8 checks passed
@dsa0x dsa0x deleted the sams/query-output-testing branch July 24, 2025 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
no-changelog-needed Add this to your PR if the change does not require a changelog entry
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants