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

Added startup failure to the Conclusion enum class and added test acc… #1737

Merged
merged 4 commits into from
Nov 11, 2023

Conversation

yasin-herken
Copy link
Contributor

Fixes#Unknown value startup_failure #1722
I added startup_failures to the Conclusion enum class and wrote a test but I couldn't figure out what GitHub workflows have with conclusion startup_failures so I wrote a test which has 0 length but if I can add workflow that has startup failures, I can change the test result.

Copy link
Member

@bitwiseman bitwiseman left a comment

Choose a reason for hiding this comment

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

@yasin-herken
Thanks for the PR!

Please review the steps in the contributing for how to record data for a new test. I've invited you to the hub4j-test-org to enable that. Then you can do whatever you need to create a workflow that fails to start and records a result for that.

@yasin-herken
Copy link
Contributor Author

I have added the startup-failure workflow however, I couldn't get the startup-failure conclusion. I am getting failure conclusion, how to create workflow that has startup-failure conclusion

@bitwiseman
Copy link
Member

@yasin-herken
Record the test with the the failure conclusion. Then manually edit the recorded JSON to have startup-failure instead of failure. Then add snapshotNotAllowed() to the top of the test method to ensure it isn't accidentally re-recorded later.

@yasin-herken
Copy link
Contributor Author

Fixes#Unknown value startup_failure #1722
I added startup_failures to the Conclusion enum class and wrote a test for it.

Copy link

codecov bot commented Nov 11, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Files Coverage Δ
...rc/main/java/org/kohsuke/github/GHWorkflowRun.java 91.35% <100.00%> (+0.10%) ⬆️

📢 Thoughts on this report? Let us know!

@bitwiseman bitwiseman merged commit 3d3e905 into hub4j:main Nov 11, 2023
11 checks passed
@yasin-herken yasin-herken deleted the demo branch November 11, 2023 06:24
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