Skip to content

Comments

fix: resolve failing tests and gofmtcheck script#390

Open
Rayhan1967 wants to merge 1 commit intolaunchdarkly:mainfrom
Rayhan1967:fix/tests-and-fmtcheck
Open

fix: resolve failing tests and gofmtcheck script#390
Rayhan1967 wants to merge 1 commit intolaunchdarkly:mainfrom
Rayhan1967:fix/tests-and-fmtcheck

Conversation

@Rayhan1967
Copy link

@Rayhan1967 Rayhan1967 commented Feb 21, 2026

Description

This PR addresses two maintenance issues identified in the repository:

  1. Fix gofmtcheck.sh Logic: The formatting check script contained a variable reference error, checking ${gofmt_files} instead of the correct ${gofmts_files}. This allowed formatting checks to erroneously pass even when gofmts issues were present. This PR updates the reference to ensure accurate format validation.
  2. Update Rule Validation Test: The TestValidateRuleResourceData unit test in launchdarkly/rule_helper_test.go was failing due to outdated assertions. A previous fix (REL-10234) introduced an intentional exception allowing context_kind: "user" to be used alongside variation. This PR updates the test cases to accurately reflect this schema validation change.

Changes

  • scripts/gofmtcheck.sh: Corrected variable reference.
  • launchdarkly/rule_helper_test.go: Refactored test cases for context kind validation.

@Rayhan1967 Rayhan1967 requested a review from a team as a code owner February 21, 2026 09:57
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.

1 participant