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

Fail Build When Pester Tests Fail #819

Merged
merged 12 commits into from Sep 7, 2021
Merged

Conversation

peombwa
Copy link
Member

@peombwa peombwa commented Aug 11, 2021

Problem

As noted in #809 (comment), failing Pester tests are not terminating the build script as expected, thus resulting in a false positive (passing checks).

Solution

This PR updates our test initializer script to fail a build when Pester tests fail. This is done by throwing an error based on the number of failed tests returned by Invoke-Pester.

Closes #820.

@peombwa peombwa self-assigned this Aug 11, 2021
@peombwa peombwa mentioned this pull request Aug 11, 2021
@adamedx
Copy link

adamedx commented Aug 16, 2021

I take it this change is doing its job? :) Hard to tell exactly why this is failing. Thanks for making this PR to address the Pester issue!

@peombwa peombwa merged commit cb6dab2 into dev Sep 7, 2021
@peombwa peombwa deleted the enhancements/FailBuildWhenTestsFail branch September 7, 2021 15:01
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.

Checks should fail when Pester tests fail
3 participants