Skip to content

tests: test the tests fail when expected#2097

Merged
mergify[bot] merged 1 commit intonix-community:mainfrom
MattSturgeon:fix_tests
Aug 27, 2024
Merged

tests: test the tests fail when expected#2097
mergify[bot] merged 1 commit intonix-community:mainfrom
MattSturgeon:fix_tests

Conversation

@MattSturgeon
Copy link
Copy Markdown
Member

@MattSturgeon MattSturgeon commented Aug 27, 2024

Adds a regression test for #2076. This test ensures that extraConfigLua is used in finalPackage and that the test will fail correctly when running nvim results in unexpected output.

I was hoping to also test more explicitly that an eval failure would be triggered when extraConfigLua is set to something invalid, but verifying the "Hello, world!" string makes it into the build log should cover most of those cases too.

At the very least this regression test ensures:

  • extraConfigLua is used in the init.lua used to run nvim in the test
  • test.runNvim correctly fails when neovim prints unexpected stdout

I used pkgs.testers.testBuildFailure as a helper, to aid in expecting a derivation build to fail.

Adds a regression test for nix-community#2076. This test ensures that
`extraConfigLua` is used in `finalPackage` and that the test will fail
correctly when running `nvim` results in unexpected output.
@MattSturgeon MattSturgeon requested a review from a team August 27, 2024 03:03
@MattSturgeon MattSturgeon changed the title tests: test the tests tests: test the tests fail when expected Aug 27, 2024
Copy link
Copy Markdown
Contributor

@khaneliman khaneliman left a comment

Choose a reason for hiding this comment

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

LGTM. I see the failure being reported in a nix flake check when I undo the previous fix. I see it succeed nix flake check with the current state.

@MattSturgeon
Copy link
Copy Markdown
Member Author

@Mergifyio queue

@mergify
Copy link
Copy Markdown
Contributor

mergify bot commented Aug 27, 2024

queue

✅ The pull request has been merged automatically

Details

The pull request has been merged automatically at 60ea38d

@mergify mergify bot merged commit 60ea38d into nix-community:main Aug 27, 2024
@mergify mergify bot temporarily deployed to github-pages August 27, 2024 16:06 Inactive
@MattSturgeon MattSturgeon deleted the fix_tests branch August 27, 2024 16:06
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