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

fix: zero test result #332

Merged
merged 1 commit into from
Dec 14, 2022
Merged

fix: zero test result #332

merged 1 commit into from
Dec 14, 2022

Conversation

kinsolee
Copy link
Contributor

@kinsolee kinsolee commented Dec 9, 2022

Changes

  • fix: zero test result
    Allow IsEmpty returns false even if there is no test cases included in a test execution(failed, passed, skipped are all 0), provided that PassedTestsRate is not empty string.

Scenario: Expect below task result could be injected into buildRun.status rather than omitted.

testResults:
  failed: 0
  passed: 0
  passedTestsRate: "0.00"
  skipped: 0
apiVersion: builds.katanomi.dev/v1alpha1
kind: BuildRun
metadata:
  name: katanomi-adefs
  namespace: default
status:
  unitTestsResults:
    - name: existing-result
      coverage:
        lines: "11"
        branches: "11.33"
    - name: unittest // this item will be omitted if IsEmpty returns true in this scenario.
      testResults:
        passed: 0
        skipped: 0
        failed: 0
        passedTestsRate: "0.00"

Submitter Checklist

As the author of this PR, please check off the items in this checklist:

  • spec PR link included
  • Follows the commit message standard
  • Meets the contributing guidelines (including
    functionality, content, code)
  • Test cases with documentation and functionality works as expected using current and related github repos (MUST deploy and check)
  • Release notes block below has been filled in or deleted (only if no user facing changes)

@kinsolee kinsolee changed the title fix: empty test result fix: zero test result Dec 9, 2022
@kinsolee kinsolee force-pushed the fix/empty-unit-test-result branch 2 times, most recently from 04fab9d to dd1e607 Compare December 13, 2022 09:37
danielfbm
danielfbm previously approved these changes Dec 13, 2022
Allow IsEmpty returns true even if there is no test cases included in a test execution(failed, passed, skipped are all 0), provided that PassedTestsRate is not empty string.
@kinsolee kinsolee merged commit 79c1652 into main Dec 14, 2022
@kinsolee kinsolee deleted the fix/empty-unit-test-result branch December 14, 2022 02:18
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