Skip to content
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 by Bors] - fix(fvm): partially assert on cli output #3608

Closed

Conversation

EstebanBorai
Copy link
Contributor

@EstebanBorai EstebanBorai commented Oct 18, 2023

Currently our tests expects download output in a specific order when executing
fvm install. This breaks if changes on responses are introduced, to avoid this
we could partially assert on the text output.

This only happens on the fvm install command as it depends on server response
to render its output.

Example of Broken Test

2023-10-18T15:25:09.8470954Z not ok 9 Supress output with '-q' optional argument
2023-10-18T15:25:09.8483122Z # (from function `assert_line' in file tests/cli/fvm_smoke_tests/../test_helper/bats-assert/src/assert_line.bash, line 202,
2023-10-18T15:25:09.8487786Z #  in test file tests/cli/fvm_smoke_tests/fvm_basic.bats, line 479)
2023-10-18T15:25:09.8546282Z #   `assert_line --index 3 "info: Downloading (4/5): cdk@0.10.14"' failed
2023-10-18T15:25:09.8554999Z #
2023-10-18T15:25:09.8555778Z # -- line differs --
2023-10-18T15:25:09.8556427Z # index    : 3
2023-10-18T15:25:09.8557991Z # expected : info: Downloading (4/5): cdk@0.10.14
2023-10-18T15:25:09.8558937Z # actual   : info: Downloading (4/5): smdk@0.10.14
2023-10-18T15:25:09.8607628Z # -

@EstebanBorai EstebanBorai marked this pull request as ready for review October 18, 2023 19:40
@EstebanBorai EstebanBorai changed the title fix: partially assert on cli output fix(fvm): partially assert on cli output Oct 18, 2023
@EstebanBorai
Copy link
Contributor Author

bors r+

bors bot pushed a commit that referenced this pull request Oct 19, 2023
Currently our tests expects download output in a specific order when executing
`fvm install`. This breaks if changes on responses are introduced, to avoid this
we could partially assert on the text output.

This only happens on the `fvm install` command as it depends on server response
to render its output.

## Example of Broken Test

```
2023-10-18T15:25:09.8470954Z not ok 9 Supress output with '-q' optional argument
2023-10-18T15:25:09.8483122Z # (from function `assert_line' in file tests/cli/fvm_smoke_tests/../test_helper/bats-assert/src/assert_line.bash, line 202,
2023-10-18T15:25:09.8487786Z #  in test file tests/cli/fvm_smoke_tests/fvm_basic.bats, line 479)
2023-10-18T15:25:09.8546282Z #   `assert_line --index 3 "info: Downloading (4/5): cdk@0.10.14"' failed
2023-10-18T15:25:09.8554999Z #
2023-10-18T15:25:09.8555778Z # -- line differs --
2023-10-18T15:25:09.8556427Z # index    : 3
2023-10-18T15:25:09.8557991Z # expected : info: Downloading (4/5): cdk@0.10.14
2023-10-18T15:25:09.8558937Z # actual   : info: Downloading (4/5): smdk@0.10.14
2023-10-18T15:25:09.8607628Z # -
```
@bors
Copy link

bors bot commented Oct 19, 2023

Pull request successfully merged into master.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title fix(fvm): partially assert on cli output [Merged by Bors] - fix(fvm): partially assert on cli output Oct 19, 2023
@bors bors bot closed this Oct 19, 2023
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