@@ -14,6 +14,7 @@ export function runCLICustomInstallTest({
1414 offlinePkgName = null ,
1515 testProxyMode = false ,
1616 proxyBlockList = [ ] ,
17+ pythonWheelsVersion = [ ] ,
1718} ) {
1819 describe ( `${ id } - Run custom |` , function ( ) {
1920 let testRunner = null ;
@@ -31,13 +32,6 @@ export function runCLICustomInstallTest({
3132 idfVersion : offlineIDFVersion ,
3233 packageName : offlinePkgName ,
3334 } ) ;
34- if ( pathToOfflineArchive ) {
35- args . push ( `--use-local-archive "${ pathToOfflineArchive } "` ) ;
36- }
37- }
38- if ( offlineIDFVersion && ! pathToOfflineArchive ) {
39- logger . info ( ">>>>>>> Offline archive not found, skipping this test" ) ;
40- this . skip ( ) ;
4135 }
4236 if ( testProxyMode ) {
4337 try {
@@ -57,6 +51,15 @@ export function runCLICustomInstallTest({
5751 logger . info ( "Error to start terminal" ) ;
5852 logger . debug ( `Error: ${ error } ` ) ;
5953 }
54+ if ( pathToOfflineArchive ) {
55+ args . push ( `--use-local-archive "${ pathToOfflineArchive } "` ) ;
56+ testRunner . sendInput ( "mkdir ~/archive" ) ;
57+ testRunner . sendInput ( `tar -xf ${ pathToOfflineArchive } -C ~/archive` ) ;
58+ }
59+ if ( offlineIDFVersion && ! pathToOfflineArchive ) {
60+ logger . info ( ">>>>>>> Offline archive not found, skipping this test" ) ;
61+ this . skip ( ) ;
62+ }
6063 } ) ;
6164
6265 afterEach ( function ( ) {
@@ -90,13 +93,35 @@ export function runCLICustomInstallTest({
9093 if ( pathToOfflineArchive ) {
9194 try {
9295 fs . rmSync ( pathToOfflineArchive , { force : true } ) ;
96+ fs . rmSync ( "~/archive" , { recursive : true , force : true } ) ;
9397 logger . info ( `Successfully deleted offline archive` ) ;
9498 } catch ( err ) {
9599 logger . info ( `Error deleting offline archive` ) ;
96100 }
97101 }
98102 } ) ;
99103
104+ for ( let pythonVersion of pythonWheelsVersion ) {
105+ it ( `0- Should verify wheels for python${ pythonVersion } on offline archive` , function ( ) {
106+ if ( ! offlineIDFVersion && ! pathToOfflineArchive ) {
107+ this . skip ( ) ;
108+ }
109+ logger . info ( `Verifying wheels for ${ pythonVersion } on offline archive` ) ;
110+ expect (
111+ fs . existsSync ( pathToOfflineArchive ) ,
112+ `Offline archive not found at ${ pathToOfflineArchive } `
113+ ) . to . be . true ;
114+ expect (
115+ fs . existsSync ( `~/archive/wheels_py${ pythonVersion } ` ) ,
116+ `Wheels folder for Python ${ pythonVersion } not found in offline archive`
117+ ) . to . be . true ;
118+ expect (
119+ fs . readdirSync ( `~/archive/wheels_py${ pythonVersion } ` ) . length > 0 ,
120+ `No wheels found for Python ${ pythonVersion } in offline archive`
121+ ) . to . be . true ;
122+ } ) ;
123+ }
124+
100125 /** Run installation with full parameters, no need to ask questions
101126 *
102127 * It is expected to have all requirements installed
0 commit comments