Skip to content

Conversation

@psafont
Copy link
Member

@psafont psafont commented Jun 4, 2025

Use cram tests to expect the desired output of the command instead

This reduces the amount of text displayed when running tests, which makes locating the errors in the logs easier

When the output of the tools changes deliberately, the expect files can be changed with dune runtest --auto-promote

Use cram tests to expect the desired output of the command instead

This reduces the amount of text displayed when running tests, which makes
locating the errors in the logs easier

When the output of the tools changes deliberately, the expect files can be
changed with `dune runtest --auto-promote`

Signed-off-by: Pau Ruiz Safont <[email protected]>
@psafont psafont changed the title xapi-idl: Avoid printing cli output when testing Reduce output when running unit tests Jun 4, 2025
@psafont psafont force-pushed the tests branch 2 times, most recently from 19f3baf to c366d13 Compare June 4, 2025 15:51
These tests simply printed output, used cram tests to document the output and
remove it from the CI logs.

IF the output gets changed on purpose, the expect file can be changed by
running `dune build @runtest-python --auto-promote`

Signed-off-by: Pau Ruiz Safont <[email protected]>
Copy link
Contributor

@last-genius last-genius left a comment

Choose a reason for hiding this comment

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

Great to see this!

@psafont psafont added this pull request to the merge queue Jun 5, 2025
Merged via the queue into xapi-project:master with commit 755d33b Jun 5, 2025
16 checks passed
@psafont psafont deleted the tests branch June 5, 2025 13:05
changlei-li added a commit that referenced this pull request Jun 11, 2025
No conflict.
Commit 62f8482 is to add new network
interface in the cli command to meet check, which is introduced by
#6502.
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