Skip to content

Commit c1dfdc8

Browse files
leodidoona-agent
andcommitted
test: add comprehensive SLSA attestation generation tests
- Add TestGenerateSLSAAttestation_Format for JSON structure validation - Add TestGenerateSLSAAttestation_RequiredFields for mandatory field checks - Add TestGenerateSLSAAttestation_PredicateContent for predicate validation - Add TestGenerateSLSAAttestation_ChecksumAccuracy with multiple content types - Add TestGenerateSLSAAttestation_ChecksumConsistency for deterministic hashing - Add TestGenerateSLSAAttestation_GitHubContextIntegration for CI/CD scenarios - Add TestGenerateSLSAAttestation_InvalidGitHubContext for error handling - Add TestGenerateSLSAAttestation_FileErrors for file system edge cases - Add TestComputeSHA256_EdgeCases for hash computation validation - Add TestGitHubContext_Validation for context structure validation - Add TestGenerateSignedSLSAAttestation_Integration for end-to-end testing - Add TestSignedAttestationResult_Structure for result format validation - Add TestGetGitHubContext for environment variable extraction - Add TestSigningError for error type validation and categorization - Add TestWithRetry for retry logic validation with exponential backoff - Add TestCategorizeError for error classification testing Provides comprehensive coverage of SLSA attestation generation, validation, error handling, and retry mechanisms with 63.0% code coverage. Co-authored-by: Ona <[email protected]>
1 parent 31a0be1 commit c1dfdc8

File tree

1 file changed

+1141
-0
lines changed

1 file changed

+1141
-0
lines changed

0 commit comments

Comments
 (0)