@@ -147,60 +147,6 @@ describe("Ocean CLI Paid Compute", function () {
147147 console . log ( `Fetched Compute Env ID: ${ computeEnvId } ` ) ;
148148 } ) ;
149149
150- it ( "should start paid compute on compute dataset and algorithm" , async function ( ) {
151- const computeEnvs = await ProviderInstance . getComputeEnvironments ( 'http://127.0.0.1:8001' ) ;
152- const env = computeEnvs [ 0 ] ;
153- expect ( env ) . to . be . an ( 'object' ) . and . to . not . be . null . and . to . not . be . undefined ;
154-
155- resources = [
156- {
157- id : 'cpu' ,
158- amount : env . resources [ 0 ] . max - env . resources [ 0 ] . inUse - 1
159- } ,
160- {
161- id : 'ram' ,
162- amount : env . resources [ 1 ] . max - env . resources [ 1 ] . inUse - 1000
163- } ,
164- {
165- id : 'disk' ,
166- amount : 0
167- }
168- ]
169- const paymentToken = getAddresses ( ) . Ocean
170- const output = await runCommand ( `npm run cli -- startCompute ${ computeDatasetDid } ${ jsAlgoDid } ${ computeEnvId } 900 ${ paymentToken } '${ JSON . stringify ( resources ) } ' --accept true` ) ;
171- const jobIdMatch = output . match ( / J o b I D : \s * ( [ ^ \s ] + ) / ) ;
172- const agreementIdMatch = output . match ( / A g r e e m e n t I D : \s * ( [ ^ \s ] + ) / ) ;
173-
174- if ( ! jobIdMatch ) {
175- console . error ( "Raw output:" , output ) ;
176- throw new Error ( "Could not find Job ID in the output" ) ;
177- }
178-
179- if ( ! agreementIdMatch ) {
180- console . error ( "Raw output for finding agreement:" , output ) ;
181- throw new Error ( "Could not find Agreement ID in the output" ) ;
182- }
183-
184- computeJobId = jobIdMatch [ 1 ] ;
185- agreementId = agreementIdMatch [ 1 ] ;
186-
187- expect ( computeJobId ) . to . be . a ( "string" ) ;
188- expect ( agreementId ) . to . be . a ( "string" ) ;
189-
190- console . log ( `jobId: ${ computeJobId } ` ) ;
191- console . log ( `agreementId: ${ agreementId } ` ) ;
192-
193- if ( ! computeJobId ) {
194- console . error ( "Job ID was empty:" , output ) ;
195- throw new Error ( "Job ID is missing" ) ;
196- }
197-
198- if ( ! agreementId ) {
199- console . error ( "Agreement ID was empty:" , output ) ;
200- throw new Error ( "Agreement ID is missing" ) ;
201- }
202- } ) ;
203-
204150 it ( "should start paid compute on compute dataset and algorithm with services id for dataset and algorithm" , async function ( ) {
205151 const computeEnvs = await ProviderInstance . getComputeEnvironments ( 'http://127.0.0.1:8001' ) ;
206152 const env = computeEnvs [ 0 ] ;
0 commit comments