Skip to content

Comments

test(oli): introduce snapshot testing#6174

Merged
Xuanwo merged 2 commits intoapache:mainfrom
xxchan:xxchan/precious-minnow
May 13, 2025
Merged

test(oli): introduce snapshot testing#6174
Xuanwo merged 2 commits intoapache:mainfrom
xxchan:xxchan/precious-minnow

Conversation

@xxchan
Copy link
Member

@xxchan xxchan commented May 12, 2025

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

  • combine integration test binaries into single binary. For faster compilation, and share test utils
  • introduce snapshot testing for tests that are easy to write and read
    Mainly 2 forms:
    • assert_cmd_snapshot!: to snapshot the result of a cmd
    • assert_cmd! with a directory_snapshot: to snapshot the overview of a directory

Are there any user-facing changes?

- combine integration test binaries into single binary. For faster compilation, and share test utils
- introduce snapshot testing for tests that are easy to write and read

Signed-off-by: xxchan <[email protected]>
@xxchan xxchan requested a review from Xuanwo as a code owner May 12, 2025 14:04
@dosubot dosubot bot added the size:XS This PR changes 0-9 lines, ignoring generated files. label May 12, 2025
@xxchan xxchan requested a review from Copilot May 12, 2025 14:05
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.

Copy link
Member

@tisonkun tisonkun left a comment

Choose a reason for hiding this comment

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

I'm feelig the test_utils out of structural, but it doesn't get worse so I'd approve this so that we can iterate more to find the way to go.

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label May 12, 2025
@Xuanwo Xuanwo merged commit e481fdd into apache:main May 13, 2025
45 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer size:XS This PR changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants