@@ -746,33 +746,29 @@ exports.generateLocalIdentifier = (mode) => {
746746
747747exports . checkLocalIdentifierRunning = ( bsConfig , localIdentifier ) => {
748748 let options = {
749- url : `${ config . localTestingListUrl } ?auth_token= ${ bsConfig . auth . access_key } &state=running ` ,
749+ url : `${ config . cypress_v1 } /local_binary_running_check ` ,
750750 auth : {
751751 user : bsConfig . auth . username ,
752752 password : bsConfig . auth . access_key ,
753753 } ,
754754 headers : {
755+ 'Content-Type' : 'application/json' ,
755756 'User-Agent' : this . getUserAgent ( ) ,
756757 } ,
758+ body : JSON . stringify ( { localIdentifier : localIdentifier } ) ,
757759 } ;
758- let that = this ;
759760 return new Promise ( function ( resolve , reject ) {
760- request . get ( options , function ( err , resp , body ) {
761+ request . post ( options , function ( err , resp , body ) {
761762 if ( err ) {
762763 reject ( err ) ;
763764 }
765+ console . log ( body ) ;
764766 let response = JSON . parse ( body ) ;
765- let localInstances = [ ] ;
766- if ( ! that . isUndefined ( response [ 'instances' ] ) ) {
767- localInstances = response [ 'instances' ] ;
767+ if ( response [ 'should_spawn_binary' ] == true ) {
768+ resolve ( false ) ;
769+ } else {
770+ resolve ( true ) ;
768771 }
769- let localIdentifiers = [ ] ;
770-
771- localInstances . forEach ( function ( instance ) {
772- localIdentifiers . push ( instance [ 'localIdentifier' ] ) ;
773- } ) ;
774-
775- resolve ( localIdentifiers . includes ( localIdentifier ) ) ;
776772 } ) ;
777773 } ) ;
778774} ;
0 commit comments