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 the unit tests validating for required rule type fields #4998

Merged
merged 1 commit into from
Nov 19, 2024

Conversation

rdimitrov
Copy link
Member

Summary

The following PR fixes the unit tests validating for required rule type fields

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@rdimitrov rdimitrov requested a review from a team as a code owner November 19, 2024 09:18
@rdimitrov rdimitrov self-assigned this Nov 19, 2024
@@ -277,7 +277,7 @@ func makeProfile(opts ...func(*minderv1.Profile)) *minderv1.Profile {

func loadRawRuleTypeDef() (json.RawMessage, error) {
// read rule type from disk and set it up as a fixture
f, err := os.Open("../../examples/rules-and-profiles/rule-types/github/branch_protection_allow_force_pushes.yaml")
f, err := os.Open("../../examples/rules-and-profiles/rule-types/github/branch_protection_allow_fork_syncing.yaml")
Copy link
Contributor

Choose a reason for hiding this comment

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

doesn't allowing fork sync also have the same issue? the branch is no longer mandatory.

Copy link
Member Author

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

d'oh! that makes sense and somehow I missed it. Thanks for clarifying!

Copy link
Member Author

Choose a reason for hiding this comment

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

Which is interesting because now it makes me wonder why this test worked before...

JAORMX
JAORMX previously approved these changes Nov 19, 2024
@rdimitrov rdimitrov merged commit 8590a30 into main Nov 19, 2024
25 checks passed
@rdimitrov rdimitrov deleted the fix-required branch November 19, 2024 10:54
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