mirror of
https://github.com/hauke68/Magallanes.git
synced 2026-09-09 23:08:56 +02:00
[Nostromo] Add tests
This commit is contained in:
@@ -62,6 +62,17 @@ class Runtime implements RuntimeInterface
|
||||
*/
|
||||
protected $rollback = false;
|
||||
|
||||
/**
|
||||
* Generate the Release ID
|
||||
*
|
||||
* @return RuntimeInterface
|
||||
*/
|
||||
public function generateReleaseId()
|
||||
{
|
||||
$this->setReleaseId(date('YmdHis'));
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the Release ID
|
||||
*
|
||||
@@ -409,4 +420,14 @@ class Runtime implements RuntimeInterface
|
||||
|
||||
return $sshConfig;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a Temporal File name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTempFile()
|
||||
{
|
||||
return tempnam(sys_get_temp_dir(), 'mage');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,6 +28,13 @@ interface RuntimeInterface
|
||||
const ON_RELEASE = 'on-release';
|
||||
const POST_RELEASE = 'post-release';
|
||||
|
||||
/**
|
||||
* Generate the Release ID
|
||||
*
|
||||
* @return RuntimeInterface
|
||||
*/
|
||||
public function generateReleaseId();
|
||||
|
||||
/**
|
||||
* Sets the Release ID
|
||||
*
|
||||
@@ -217,4 +224,11 @@ interface RuntimeInterface
|
||||
* @return array
|
||||
*/
|
||||
public function getSSHConfig();
|
||||
|
||||
/**
|
||||
* Gets a Temporal File name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getTempFile();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user