@ Given ( "^I authenticate to DCOS cluster '(.+?)' using email '(.+?)'( with user '(.+?)'( and password '(.+?)'| and pem file '(.+?)'))?$" ) public void authenticateDCOSpem ( String remoteHost , String email , String foo , String user , String bar , String password , String pemFile ) throws Exception { String DCOSsecret ; if ( foo == null ) { commonspec . setRemoteSSHConnection ( new RemoteSSHConnection ( "root" , "stratio" , remoteHost , null ) ) ; } else { commonspec . setRemoteSSHConnection ( new RemoteSSHConnection ( user , password , remoteHost , pemFile ) ) ; } commonspec . getRemoteSSHConnection ( ) . runCommand ( "sudo cat /var/lib/dcos/dcos-oauth/auth-token-secret" ) ; DCOSsecret = commonspec . getRemoteSSHConnection ( ) . getResult ( ) . trim ( ) ; setDCOSCookie ( DCOSsecret , email ) ; }
Authenticate in a DCOS cluster