Skip to content

Commit

Permalink
remove system-skip-chunks image
Browse files Browse the repository at this point in the history
  • Loading branch information
andiradulescu committed Sep 9, 2024
1 parent f36e781 commit 8381ab2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 17 deletions.
17 changes: 4 additions & 13 deletions src/utils/manifest.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,19 +46,10 @@ export class Image {
constructor(json) {
this.name = json.name
this.sparse = json.sparse

if (this.name === 'system') {
this.checksum = json.alt.hash
this.fileName = `${this.name}-skip-chunks-${json.hash_raw}.img`
this.archiveUrl = json.alt.url
this.size = json.alt.size
} else {
this.checksum = json.hash
this.fileName = `${this.name}-${json.hash_raw}.img`
this.archiveUrl = json.url
this.size = json.size
}

this.checksum = json.hash
this.fileName = `${this.name}-${json.hash_raw}.img`
this.archiveUrl = json.url
this.size = json.size
this.archiveFileName = this.archiveUrl.split('/').pop()
}
}
Expand Down
6 changes: 2 additions & 4 deletions src/utils/manifest.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ for (const [branch, manifestUrl] of Object.entries(config.manifests)) {
})

if (image.name === 'system') {
test('alt image', () => {
expect(image.sparse, 'system image to be sparse').toBe(true)
expect(image.fileName, 'system image to be skip chunks').toContain('-skip-chunks-')
expect(image.archiveUrl, 'system image to point to skip chunks').toContain('-skip-chunks-')
test('system image', () => {
expect(image.sparse, 'system image to not be sparse').toBe(false)
})
}

Expand Down

0 comments on commit 8381ab2

Please sign in to comment.