@@ -30,23 +30,31 @@ for (const [branch, manifestUrl] of Object.entries(config.manifests)) {
30
30
for ( const image of images ) {
31
31
describe ( `${ image . name } image` , async ( ) => {
32
32
test ( 'xz archive' , ( ) => {
33
- expect ( image . archiveFileName , 'archive to be in xz format' ) . toContain ( '.xz' )
34
- expect ( image . archiveUrl , 'archive url to be in xz format' ) . toContain ( '.xz' )
35
- } )
36
-
37
- if ( image . name === 'system' ) {
38
- const fileNameSkipChunks = image . fileName . includes ( '-skip-chunks-' ) ;
39
- const archiveUrlSkipChunks = image . archiveUrl . includes ( '-skip-chunks-' ) ;
40
- expect ( fileNameSkipChunks , 'file name and archive url to match' ) . toBe ( archiveUrlSkipChunks ) ;
33
+ expect ( image . fileName , 'file to be uncompressed' ) . not . toContain ( '.xz' )
34
+ if ( image . name === 'system' ) {
35
+ const fileNameSkipChunks = image . fileName . includes ( '-skip-chunks-' ) ;
36
+ const archiveUrlSkipChunks = image . archiveUrl . includes ( '-skip-chunks-' ) ;
37
+ expect ( fileNameSkipChunks , 'file name and archive url to match' ) . toBe ( archiveUrlSkipChunks ) ;
38
+
39
+ if ( fileNameSkipChunks || archiveUrlSkipChunks ) {
40
+ // pre AGNOS 11 assumption
41
+ expect ( image . sparse , 'system image to be sparse' ) . toBe ( true )
42
+ } else {
43
+ // post AGNOS 11 assumption
44
+ expect ( image . sparse , 'system image to not be sparse' ) . toBe ( false )
45
+ }
41
46
42
- if ( fileNameSkipChunks || archiveUrlSkipChunks ) {
43
- // pre AGNOS 11 assumption
44
- expect ( image . sparse , 'system image to be sparse' ) . toBe ( true )
47
+ if ( image . compressed ) {
48
+ expect ( image . fileName , 'not to equal archive name' ) . not . toEqual ( image . archiveFileName )
49
+ expect ( image . archiveFileName , 'archive to be in xz format' ) . toContain ( '.xz' )
50
+ expect ( image . archiveUrl , 'archive url to be in xz format' ) . toContain ( '.xz' )
51
+ }
45
52
} else {
46
- // post AGNOS 11 assumption
47
- expect ( image . sparse , 'system image to not be sparse' ) . toBe ( false )
53
+ expect ( image . compressed , 'image to be compressed' ) . toBe ( true )
54
+ expect ( image . archiveFileName , 'archive to be in xz format' ) . toContain ( '.xz' )
55
+ expect ( image . archiveUrl , 'archive url to be in xz format' ) . toContain ( '.xz' )
48
56
}
49
- }
57
+ } )
50
58
51
59
test ( 'image and checksum' , async ( ) => {
52
60
const imageWorkerFileHandler = {
0 commit comments