Stale SHA Validation Test in ValidateGuidesTaskSpec Causes Test Suite Failure
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 90/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- groovy
- Domain
- build-system, testing
Research direction
Open buildSrc/src/test/groovy/website/gradle/tasks/ValidateGuidesTaskSpec.groovy and review the stale SHA rejection test and the sha entry in VALID_MINIMAL. Run ./gradlew -p buildSrc test --tests "website.gradle.tasks.ValidateGuidesTaskSpec" before and after the cleanup; done means all eight tests pass and the fixture matches the current ValidateGuidesTask schema.
Written by the indexing model from the issue text.
Description
Description
In commit 35d2834c, the task VendorGuideTask and all dead sampleRef.sha fields were retired, and ValidateGuidesTask had its SHA_40_HEX regex and sampleRef.sha validation logic removed. However, the test method shape mode rejects a non-40-char SHA and the sha: entry in the VALID_MINIMAL fixture in buildSrc/src/test/groovy/website/gradle/tasks/ValidateGuidesTaskSpec.groovy were inadvertently left behind. Because ValidateGuidesTask no longer validates or rejects non-40-character SHAs, running the test suite causes ValidateGuidesTaskSpec to fail with WrongExceptionThrownError: Expected exception of type 'org.gradle.api.GradleException', but no exception was thrown.
Steps to Reproduce
- Open a terminal in the root of the repository.
- Run
./gradlew -p buildSrc test --tests "website.gradle.tasks.ValidateGuidesTaskSpec". - Inspect the test output.
- See error:
ValidateGuidesTaskSpec > shape mode rejects a non-40-char SHA FAILED.
Expected Behavior
The test suite in buildSrc should pass cleanly and accurately reflect the current schema rules of ValidateGuidesTask (where SHA is no longer validated).
Actual Behavior / Error Logs
ValidateGuidesTaskSpec > shape mode rejects a non-40-char SHA STANDARD_OUT
[validateGuides] mode=shape: 1 guide(s) parsed, 0 SKIP-warned, 0 errors
ValidateGuidesTaskSpec > shape mode rejects a non-40-char SHA FAILED
org.spockframework.runtime.WrongExceptionThrownError: Expected exception of type 'org.gradle.api.GradleException', but no exception was thrown
at org.spockframework.lang.SpecInternals.checkExceptionThrown(SpecInternals.java:84)
at org.spockframework.lang.SpecInternals.thrownImpl(SpecInternals.java:67)
at website.gradle.tasks.ValidateGuidesTaskSpec.shape mode rejects a non-40-char SHA(ValidateGuidesTaskSpec.groovy:68)
8 tests completed, 1 failed
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':test'.
> There were failing tests. See the report at: file:///D:/grails-static-website/buildSrc/build/reports/tests/test/index.html
- Dominant language
- Groovy
- Stars
- 31
- Forks
- 100
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 15
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/grails-static-website
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
apache/grails-static-website#549 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 45/100
apache/grails-static-website#392 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 25/100
apache/grails-static-website#379 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
apache/grails-static-website#374 · 6 comments ·
-
apache/grails-static-website#371 · 1 assignee ·
All issues in apache/grails-static-website
Similar issues
-
type/automation type/tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·
-
package-update
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
oSoWoSo/vOid_Community_repOsitory#147 · 1 comment ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
agentic-workflows cascade-suspected
Difficulty 1/5 Under an hour Newbie friendliness 88/100