Task Description
Add edge case tests and finalize the bundle validation feature.
TDD Cycle
RED Phase - Write Failing Tests
Create edge case tests:
TestValidateBundle_EmptyPresetsArray - empty presets should fail (minItems: 1 in schema)
TestValidateBundle_DeeplyNestedBundle - validation works with nested directory structures
TestValidateBundle_MalformedArchive - graceful handling of corrupted tar.gz
TestValidateBundle_PermissionDenied - handles permission errors gracefully
TestBundleValidateCommand_VerboseOutput - verbose flag shows detailed validation info
TestValidateBundle_MultipleErrors - reports all validation errors, not just first
GREEN Phase - Implement to Pass
- Enhance
ValidateBundle() to handle edge cases
- Add
--verbose flag to CLI command (optional)
- Ensure all errors are collected and reported (not fail-fast)
- Add robust error messages for edge cases
- Integration testing with real bundle fixtures
Finalization Tasks
Acceptance Criteria
Task Description
Add edge case tests and finalize the bundle validation feature.
TDD Cycle
RED Phase - Write Failing Tests
Create edge case tests:
TestValidateBundle_EmptyPresetsArray- empty presets should fail (minItems: 1 in schema)TestValidateBundle_DeeplyNestedBundle- validation works with nested directory structuresTestValidateBundle_MalformedArchive- graceful handling of corrupted tar.gzTestValidateBundle_PermissionDenied- handles permission errors gracefullyTestBundleValidateCommand_VerboseOutput- verbose flag shows detailed validation infoTestValidateBundle_MultipleErrors- reports all validation errors, not just firstGREEN Phase - Implement to Pass
ValidateBundle()to handle edge cases--verboseflag to CLI command (optional)Finalization Tasks
go test ./...Acceptance Criteria
go run . bundle validate ./e2e/testdata/fixture-bundleexits 0