mirror of
https://github.com/gradle/actions.git
synced 2025-11-26 17:09:10 +08:00
Verify wrappers for distribution-snapshots
By slurping the checksum URLs from https://services.gradle.org/distributions-snapshots/ we can include these unpublished wrapper checksums in validation. Fixes #281
This commit is contained in:
@@ -32,6 +32,22 @@ test('fetches wrapper jars checksums', async () => {
|
||||
).toBe(true)
|
||||
})
|
||||
|
||||
test('fetches wrapper jar checksums for snapshots', async () => {
|
||||
const nonSnapshotChecksums = await checksums.fetchUnknownChecksums(false, new checksums.WrapperChecksums)
|
||||
const validChecksums = await checksums.fetchUnknownChecksums(true, new checksums.WrapperChecksums)
|
||||
|
||||
// Expect that at least one snapshot checksum is different from the non-snapshot checksums
|
||||
expect(validChecksums.size).toBeGreaterThan(nonSnapshotChecksums.size)
|
||||
})
|
||||
|
||||
test('fetches all wrapper checksum URLS for snapshots', async () => {
|
||||
const checksumUrls: string[] = []
|
||||
await checksums.addDistributionSnapshotChecksums(checksumUrls)
|
||||
|
||||
expect(checksumUrls.length).toBeGreaterThan(100) // May only be a few unique checksums
|
||||
console.log(checksumUrls)
|
||||
})
|
||||
|
||||
describe('retry', () => {
|
||||
afterEach(() => {
|
||||
nock.cleanAll()
|
||||
|
||||
Reference in New Issue
Block a user